Trixarian / Alia

A Pyborg fork with additional features
14 stars 8 forks source link

Alia - a PyBorg with a difference

Alia is a self-optimising Pyborg IRC Bot with the added ability to be taught via commands.

The original Pyborg was written by Tom Morton and Sébastien Dailly. It's a simple python Markov chain driven bot (similar to MegaHAL) with the unique ability to learn speech patterns by figure out which words go togeher well. This gives it the ability to generate replies on it's own aswell as repeating previously learned responses.

What sets Alia apart from the default pyborg bot are the following:

New Commands

To teach Alia a response, use the !learn or !teach command with the trigger and response seperated by an |. Spaces don't matter, but the length is limited to the standard IRC message line (around 500 characters). Multiple responses in the same line is also supported and will be picked at random based on the amount of responses saved for a trigger. Triggers are searched by closest matches so single words or short triggers work better, but words can be searched within longer triggers:
!teach This is a trigger | And this is a response!
!learn Hey There!|Hey to you too! ;) !teach Trigger | Response 1 | Response 2 | Oh My

To see how many responses match a phrase, use the !find command followed by the phrase:
!find Joe
!find Trixar_za is God

To make Alia forget a learned response use the !forget command followed by the phrase:
!forget Joe
!forget Trixar_za is dumb

To see how many responses Alia has learned so far you can use the !responses command:
!responses

You can also teach Alia to respond with an action instead of a message by prefixing plus (+) to the response:
!teach I Love you!|+hugs #nick

For a complete list on how to use Alia, please see docs/README for the original Pyborg documentation.

How to use

To use Alia, just run python pyborg-irc.py to generate the cfg files. Press Ctrl+C to stop pyborg-irc.py. Modify pyborg-irc.cfg and pyborg.cfg to suit your needs and then use ./alia to start the bot silently. Now allow her to idle in a busy channel so she can learn some basic responses. That's it. You're done. Enjoy!