Anna/Alice chat bot and connecting to IRC

  • 2 Replies


  • Roomba
  • *
  • 4
Anna/Alice chat bot and connecting to IRC
« on: December 16, 2016, 07:39:54 pm »
I think  the best way to ask this question is to provide as many details about my own progress and difficultly's to this point.

The question: How to code the anna bot to connect to an IRC server?

The details:
Anna bot on the "Chatterbot Collection"
I am not sure but I think I need to add a listener to the startup.xml file. I have been unable to find any example of a working startup file for this but here is an example of my best guess that did not work.

<?xml version="1.0"?>
<!--This is an example startup.xml file for Program D.-->
<!--programd-startup is the root element and is required.-->

        <bot id="Anna" enabled="true">
            <!--Bot predicates are set using the property tag. These are just examples.
                Be sure to set properties BEFORE loading AIML files.-->
                <property name="name" value="anna"/>
              <!--  <property name="maxclients" value="3"/> -->
            <!--Listener types must correspond to the appropriate
                identifiers for listeners that are available in your classpath.-->
           <AliceIRC="host" value=""/>
           <AliceIRC="port" value="6667"/>
           <AliceIRC="nick" value="Anna"/>
           <AliceIRC="channel" value="#sample"/>
            <!--You can include such things as predicates, substitutions, and
                sentence-splitters directly here, but it is likely that multiple
                bots will use the same ones, so it's more convenient to use the
                href attribute on such elements, as shown.-->
            <predicates href="predicates.xml"/>
            <substitutions href="substitutions.xml"/>
            <sentence-splitters href="sentence-splitters.xml"/>
            <!--You may enumerate each file you want the bot to load, or use
                simple glob-like expressions with "*".
                The path is relative to the location of this file.-->


Here is some additional information contained in the one readme.txt I have been able to find so far.

2. Configuration

There's a lot to configure with Program D. What's needed for you really
depends on how you want to use the program. If you don't care about
running a web server, you don't need to bother with the "*HTTP Server*
<#config-http-server>" section. If you don't care about using Program D
with chat interfaces like AOL Instant Messenger or IRC, you won't be
interested in the information about "*Chat Listeners*
<#config-listeners>". If you don't care about high-volume applications,
or don't really want to do database-based log analysis, you can skip the
"*Database* <#config-database>" section.

And this information seams to be to cryptic for me to try and follow as well.

2.2. Chat Listeners

In current Program D nomenclature, a "listener" is a program that knows
how to speak a particular protocol and interpret messages for the bot.
For instance, the AliceIRCListener understands the popular IRC protocol
and allows you to connect your bot to any IRC server.

You can enable one or more listeners for each bot. Each listener has its
own unique configuration parameters, which are specific to the
requirements of the protocol for which it's designed. You'll find
examples of each currently-available listener in the
PROGRAMD/conf/startup.xml file.

Listeners for a given bot are specified within the <listeners> element,
in individual <listener> elements. Each <listener> element must have two
attributes: "type", and "enabled". The value for "type" must correspond
with a value assigned by the developer to a listener that is somewhere
in the Java classpath for Program D. The example startup.xml includes an
example of each type currently known. The value of "enabled" must be
"true" or "false", allowing the listener to be switched on or off with

The parameters for a listener are specifed in individual <parameter>
elements within the <listener>. For example:

<parameter name="host" value=""/>
<parameter name="port" value="6667"/>
<parameter name="nick" value="programd"/>
<parameter name="channel" value="#bots"/>

These are the parameters set for the example use of the
AliceIRCListener, whose type string is "AliceIRC".

When you enable a chat listener, you will see its output mixed in with
the console output. You can also interact with some listeners if they
implement the "commandable" interface (see below <#commandables>).

So far I can make Anna run in the terminal window, but when I try to modify the listener section and add the server information I get this error and I don't understand it.

 Could not find a processor for "AliceIRC="host""!

Thanks for any leads to figuring out this riddle.





  • Roomba
  • *
  • 4
Re: Anna/Alice chat bot and connecting to IRC
« Reply #1 on: December 26, 2016, 05:28:03 am »
Since I don't like to leave a forums post with 0 replies...

Although I have not found out yet how to configure this script, I did find a script that I was able to get working as intended. J-Alice The file is complete enough and I was able to make it work.



  • Administrator
  • **********************
  • Colossus
  • *
  • 6399
  • Mostly Harmless
Re: Anna/Alice chat bot and connecting to IRC
« Reply #2 on: December 26, 2016, 04:43:30 pm »
Glad you found a solution :)

But yes, I haven't seen anyone on the forum who has been playing with IRC for a long time, which explains the lack of replies.

Thanks for taking the time to post a solution and Happy Holidays to you :)


Users Online

40 Guests, 2 Users
Users active in past 15 minutes:
ranch vermin, ivan.moony
[Trusty Member]

Most Online Today: 48. Most Online Ever: 208 (August 27, 2008, 09:36:30 am)