Showing posts with label kon. Show all posts
Showing posts with label kon. Show all posts

Friday, April 24, 2009

Kon version 1.2.0 release

Kon with the Twitter Client is now out!

Version 1.2.0.
  • Added the ability for Kon to send messages to Twitter. Right now this uses the LB Brain to construct a random sentence and send it up to a twitter account. You will need to add the following to your config file if you want to use this feature: <usetwitter>true</usetwitter>
    <twitterusername>your twitter user name goes here</twitterusername>
    <twitterpassword>your twitter password goes here</twitterpassword>
    It should send a new message initially upon connecting to the IRC server and again around every hour/hour and a half afterwards
  • Added a new console command. /TwitterInfo Will display information about the built-in twitter client. This may be expanded in the future.
  • Added a new USER-LEVEL command: !twitter The command will return the current twitter status (if twitter client is on and in use).

Download Binaries: Click here
Downlod Source: Click here (and download all the files)

Sunday, April 19, 2009

Kon version 1.2.0 note

Kon is now on Twitter! I'll probably post the binaries to the new version that has the Twitter client built-in as soon as I'm sure it's working correctly.

But yeah! Kon can now connect to Twitter and send a random line that it generates. What's the point of it? Well, no real point other than to say I did it. That and if you ever wanna follow a chatterbot now's your chance to do so. You might see some strange lines. Some may be coherent and others might be downright strange. After all, it's generating completely random lines based on content it has seen in my IRC channel.

I'm waiting for the day Kon generates a "yo dawg!" message and sends it off to Twitter. That'll make my night.

http://twitter.com/konbot

I've got it set so that Kon updates his twitter approximately every hour but I think it's really updating closer to an hour and a half. I'll have to look at that sometime later.

Sunday, March 8, 2009

Kon version 1.1.1 release

Another day, another release of Kon.

Version 1.1.1.
  • Moved PingControl to its own file.
  • Fixed PingControl so that it actually pings the server as intended.
  • Added a check that will help check to see if the bot has pinged out and not realized it. If so, it will attempt to reconnect.
  • Added <retryattempts>#</retryattempts> to the config file. If you want the bot to attempt to reconnect more than the default 5 times, set it in here.
  • Added a new user-level command: !Dinfo Will show a few tidbits of internal info (reconnect attempt/total, if ping control is set to true, and the # of ping attempts so far). Really only useful for myself, but you might find it interesting.
  • Changed the reconnect time to three minutes to allow time for ghosts to ping out on the server.


Download Binaries: Click here
Downlod Source: Click here (and download all the files)

Wednesday, January 7, 2009

Kon version 1.1.0 release

I know it's only been a few days since I last released a version of Kon but this update is important. I believe, with the help of Kintora of Esper.net, the reconnect code is working and fixed. It involved a lot of rewriting of Kon's code and adding a whole new thread. That's pretty much all this update includes, so don't look for any improvements on the AI.

I still remind everyone that Kon is not a full IRC client. I'm just trying to get reconnect to work properly so the bot can be left online for a few days without having to restart it manually.

Download Binaries: Click here
Downlod Source: Click here (and download all the files)

Monday, January 5, 2009

Kon version 1.0.11 release

It's the first update of the new year! Happy New Years everyone. May 2009 be good for all.

Now then.

Kon is now version 1.0.11 and has been released. Here's what's new/changed:

  • Fixed a small issue of certain modes not displaying all of the data (such as opping not showing who was opped).
  • Changed the logger and display so that it shows which channel the line appears in. I.e. [#channel] message
  • Fixed an error that would cause the bot to chop off the ":" in an emoticon if that was the first thing said in a line.
  • Added a /CLEAR command to the console. Will clear the window of all text.
  • Worked on the reconnect code...again.
  • Added a check to stop the bot from reconnecting if it reconnects more than 5 times in a session.
  • Added method to handle the appearance of KICK messages.
  • Tried to improve how the LB Brain constructs sentences with a topic.
  • Fixed another small potential bug with !utter
  • Changed the /SAY /PART and /JOIN commands slightly.

The new /SAY, /PART and /JOIN commands are as follows:
  • /SAY #channel message will send a message to the channel you specify
  • /SAY message will try to send the message to the default channel (the one it joins upon startup)
  • /PART #channel will try to leave the channel you specify
  • /PART will try to leave the default channel (the one it joins upon startup)
  • /JOIN #channel still works the same, just some internal things were changed to help with the changes to the other commands.
You may notice that you cannot use /SAY to message people in private query. I'd like to remind everyone that Kon is not meant to be a full standalone IRC client. If you want something like that, use mIRC or any of the other more complete clients. Kon is intended to be a chatterbot. However, I have found times when I needed to message a channel from Kon's end, thus the need for the /SAY change/fix.

As for the reconnect code... well, it SHOULD reconnect now. However, in the event that something goes wrong, it now has a limited number of tries to reconnect. After five attempts it will no longer try to reconnect and will need to be restarted manually. This is to prevent potential errors and potential connect/disconnect flooding to the server.

I'm not sure what the next update of Kon will entail. Maybe trying to improve the way commands are processed and to continue adding more error support. We'll see.

Download Binaries: Click here
Downlod Source: Click here (and download all the files)

Wednesday, December 3, 2008

A Small Update

It's been awhile since I last posted in this little blog and I thought it was time to let people know I was still alive and kicking.

I've been working on Kon version 1.0.11. So far here's the changelog for that version:

  • Fixed a small issue of certain modes not displaying all of the data (such as opping not showing who was opped).
  • Changed the logger and display so that it shows which channel the line appears in. I.e. [#channel] <> message
  • Fixed an error that would cause the bot to chop off the ":" in an emoticon if that was the first thing said in a line.
  • Added a /CLEAR command to the console. Will clear the window of all text.
  • Worked on the reconnect code...again.
  • Added method to handle the appearance of KICK messages.
Regarding the reconnect code this time around: I'm pretty sure it works a whole lot better but it still seems to have flaws. For some reason I just can't seem to get it to work correctly. Sometimes the bot will reconnect, but most of the time it gives an error that persists. And sometimes it'll reconnect but disconnect immediately after without reason. But I'll keep at it.

This version is not available for download just yet.

For some reason I felt compelled to sign up for Twitter. I really don't know why and I'll probably rarely even use it beyond this initial mention of it. But who knows? http://twitter.com/iyouboushi

I entered, and failed, NaNoWriMo this year. My (unfinished) novel can be found by clicking here. I still need to update the blog and continue the story. I do intend to finish the novel, I just don't know when.

Barring some pointless Internet Drama, there's nothing else to mention. Thus this update has come to an end.

Monday, October 20, 2008

Kon version 1.0.10 release

This is a fairly small update with most of it intended to move the bot to towards multiple channel use. Here's the full changelog:

  • Fixed a small potential bug with !utter
  • Changed !randomTalk # so that it reflects a message when the % has been changed.
  • Changed randomTalk so that setting it to 0 will really shut it off.
  • Changed the /join console command so that more than one channel can be joined.
  • Changed all commands to display the text in the channel in which the command was used.
  • Added a !join #channel command. User level.
  • Added a !part #channel command. User level.
  • Adjusted many commands to work with multiple channels rather than the defined channel.
Download Binaries: Click here
Downlod Source: Click here (and download all the files)


Oh yeah. There's also a README text file in the zip now that explains the various commands and how to set the bot up.

Enjoy!

Tuesday, July 15, 2008

Kon version 1.0.9 release

A fairly decent update for the bot.

As previously mentioned, this update changes the way sentences are structured. The topic, if the bot can find one, is now no longer the first word of the sentence. Instead it tries to build a bit of the sentence around it.

Another major change is the way the LB Brain is constructed. With this version it starts a longer depth to try and help with the pure randomness. People who compile Kon can turn off the longer depth and go back to the shorter depth by changing the variable shortDepth in LB.cs to true. The reason I did this is for those larger brain files. The larger the brain file the more random it starts to become. If you increase the depth, however, it should still be random but not to the point of insanity. Unfortunately, there's no way to convert your old brain files over so you'll have to start over.

This update improves the look of IRC in the bot's window including the appearances of: PART, NICK, NOTICE and MODE messages. It also allows the bot to see who joins multiple channels, whereas before it would only show the one channel set to join at start.

The last major advancement for this update is what I call RandomTalk. RandomTalk is exactly what it sounds like: it allows the bot to randomly talk when it's not being addressed. It works on a percentage that's set in the config file. There's also a command that admin and users can use to set it: !randomTalk [#]. By itself (!randomTalk) the bot will tell you what percent it's set at. With a number from 1 to 100 (example: !randomTalk 100) will set the percent to that number. To turn it off set it to -1.

And that's all for this update.

Download Binaries: Click here
Downlod Source: Click here (and download all the files)

Wednesday, July 9, 2008

Kon version 1.0.9 In Development

It seems like I just can't stop messing with Kon. Even after the release of 1.0.8 six days ago, I've already started development on the next version. Not only that, I've already fixed a bug and improved the sentence development bit of LB Brain.

Thus far:

  • Fixed a small bug that prevented Kon from seeing the first word in a sentence if it could potentially be a topic of a sentence.
  • Changed the way topics are picked so that it randomly chooses one if there's more than one.
  • Changed the way topic sentences are constructed. Now Kon tries to build the sentence AROUND the topic, not START the sentence with the topic. This may or may not work as intended.
  • Added a little more filtering to LB Brain responses to try and not end up with a lone " or a misplaced ) at the end of sentences.

More to come.

Thursday, July 3, 2008

Kon version 1.0.8 release

Another update to the chatterbot! Hooray!

This update will be rather small compared to the last update. Still, I think it's taken a step forward in the right direction on becoming a much smarter bot.

This version fixes the notorious "null message" bug. In previous versions Kon would cause an error to happen (and potentially crash) when someone typed kon: with no text sent to the bot. This version fixes that and Kon will give a random sentence.

As I mentioned in the last post, Kon's Google Brain was broken and has been fixed to work again. It's not any smarter, nor do I intend to try and make it any smarter, but it's at least working again.

This version also starts two different methods to try and increase Kon's intelligence. First up, a grammar fixing function. This function will attempt to fix certain grammatical mistakes such as changing "am you" to "are you." Right now it doesn't fix a whole lot but hopefully in the future it will.

Second, Kon (when using the LB Brain) will now attempt to try and find a "topic" in what people say to him. Why? Because he tries to build his response around the topic that he finds. Note that this only works with the LB Brain and isn't a true topic finder. Right now it's just seeking for uncommon words. This will hopefully improve as time goes on. There's a new admin and user command, !toggleTopic, that will turn this function on and off.

Finally for this update, I noticed that my LB Brain files were getting to be rather massive in size. Knowing how Kon builds random sentences with this brain I thought I'd write a little utility to try and reorganize the brains and hopefully speed Kon up. Thus the "LB Brain Utility" was born. This small 20KB program comes packed with Kon and, for now, sort the brain files so that all the starting sentences are near the top. For example:

START_SENTENCE Isn't that
another line
another line 2
START_SENTENCE another start

will become

START_SENTENCE Isn't that
START_SENTENCE another start
another line
another line 2

If your LB Brain files get rather large (mine was almost 2MB) it is recommended to run this utility at least once a week. Warning: do not run this program while Kon is actively connected to a channel. Disconnect him first THEN run it. Otherwise there's potential to corrupt the brain files.

And that's all for this update. Enjoy.

Download Binaries: Click here
Downlod Source: Click here (and download all the files)

Tuesday, July 1, 2008

Broken Google Brain

I've become aware that Kon's "Google Brain" is now broken. Apparently something has changed with the way Google returns their results so the current regex pattern is broken. I'm going to fix it and release an update sometime in the near future.


-Edit-
Because I'm not ready to upload the next version just to fix "Google Brain" but still want people to know how to fix it (if they want to use it) I'll post the new regEx pattern here.


Click to expand to full size

Keep in mind all this does is fix it so that it will work again. It doesn't improve the results any, so the brain is still basically useless. I don't forsee me trying to fix that anytime soon.

Tuesday, May 27, 2008

Kon version 1.0.7 release

The last time I touched Kon was back on Feb 28th. When I had closed down the IDE that final time I thought that it was probably the closest that I'd ever come to being able to make Kon "learn." To be honest, that feeling hasn't wavered all that much, but I have found ways to improve and enhance Kon since then.

First up are bug fixes. After having run Kon for a few weeks observing I've noticed a few major bugs that have popped up. Two of which caused the bot to go BOOM. I also discovered that it wasn't replacing "UNNAMED_USER" correctly with someone from the channel. That has since been fixed. Also fixed: when a user used to talk to Kon in query he would respond in channel. Now he responds in query to queries.

Another thing I really wanted to get done with the last version but got tired before finishing was separating commands into three types: admin, users, and everyone. This version has achieved this. There's one admin that must be set, then the admin can add multiple users. All of the commands have been split into one of those three categories.

One last thing I've done was go back and redo the LB brain so that it splits questions and all other lines ("statements") into separate files. If the user asks Kon a question he will ALWAYS respond with a statement. Otherwise, it will be a 50/50 shot on which one he'll do. It's not a huge change, but it might make things a little easier in the future should I choose to pursue other ideas I have.

Download Binaries: Click here
Downlod Source: Click here (and download all the files)


Complete changelog:

  • Fixed an error when you toggle the LB brain off that caused the bot to crash.
  • Fixed an error with !LBinfo when the LB brain wasn't loaded.
  • Tried to fix the reconnect command, again.
  • Seperated the IncomingCommand method into its own file.
  • Seperated the ConsoleCommand method into its own file.
  • Seperated the logging method into its own file.
  • Added !konInfo to the list of commands. This will send the version information to the channel.
  • Changed the way the LB brain works by seperating questions and statements. Now when someone asks a question to the bot, it will reply with a statement (a non-question). Otherwise, it'll be random whether or not it asks a question or replies with a statement.
  • Fixed a channel user list bug that wasn't showing the list of channel users after someone talked to the bot for the first time.
  • Added a !channelusers command that will display all the users in the channel (for testing purposes) ** warning: don't use this command in an extremely busy channel with a ton of users (more than 30) or else it might crash the bot.
  • Added an !utter command that will Kon to randomly say something to the channel.
  • Added an admin section to the config file. Admins have access to all commands and have the ability to add 'users' to the list.
  • Commands have been broken down by type: admin only, users, anyone.
  • Fixed a bug in previous versions where Kon would spout two responses for one input line.
  • Fixed a bug that caused Kon to reply to the main channel when someone messaged him in private. Now he will respond to private messages by messaging the person who is talking to him.
  • ADMIN ONLY commands: !addUser (nick), !remUser (nick), !quit
  • ADMIN AND USERS ONLY commands: !reload, !reloadAIML, !toggleAIML, !toggleGoogle, !toggleLB, !channelUsers, !utter
  • ANYONE commands: !splash, !konInfo, !brainInfo, !LBinfo
Until next time...

Monday, March 24, 2008

Kon version 1.0.6 release

Hey all. I'm not quite dead yet. And I really haven't been working on anything major. I decided to just go ahead and release what I had of Kon 1.0.6 to the public. You can download the binary by clicking here or the source files by clicking right here.

Here's what I did for this version:

  • Changed "brain.kon" to "kon.brain" in order to keep consistency later on (with new brain additions).
  • Updated AIML dll by myself in order to try and improve memory management. The new dll MUST be used in order for this version of Kon to work correctly (it is included in the zip and in both src folders).
  • Improved and fixed the PING/PONG so that it finally sends the correct information back
  • Improved most of the IRC code. The ReceiveData() method now uses a combination of IF/ELSE and SWITCH statements to determine what the server messages are showing up (for example "PING" or "PRIVMSG", etc). This was changed from pure IF/ELSE.
  • Added multiple methods to handle various messages (QUIT method, PRIVMSG method, etc)
  • Added a reconnect() method. ** It is in testing stages right now and may not work completely right.
  • Added try/catch to the logger method to try and prevent certain errors
  • Changed the way the log file works slightly to try and prevent exceptions and to just improve it
  • Added an authorize() method and made it so that submitting the user and nick are now in that method
  • Fixed an exception that kept being thrown when quitting
  • Removed the "full path" stuff from the main function when generating and reading the config file. This will hopefully stop a bug that keeps appearing.
  • Changed Kon's AI line grabbing method to include a seed based on the computer's time instead of letting the computer do it manually.
  • Changed Kon's AI filter a little bit to not include lines that are less than 5 characters in length.
  • Added the ability for Kon to address random channel users instead of just the person talking to him.
  • Changed the location of the replace emoticon functions from AI.cs to filter.cs.
  • Added the very first version of "LB Brain" -- a brain that's based on BishounenNightBird (from Esper.net)'s "Language Bot" (LB). Mine isn't 100% like his, but it's close enough.
  • Changed "UNNAMED USER" to "UNNAMED_USER" to resolve conflicting problems in LB Brain.
  • Added a /raw console command that sends things directly to the server
  • Changed the way it replaces UNNAMED_USER so that if it's UNNAMED_USER: it will address the person talking to the bot. Other UNNAMED_USERs will still be replaced with a random person.
What's missing? Well I still haven't added any kind of user list to allow certain access to commands. As a result, the bot owner is still set to me and my nick is the only one that will allow it to be closed using the internal command. I'm also not done with all of the IRC commands and making them look good in the console window. When I get the urge to work on Kon again, those two things will probably take priority over everything else.

Also, as mentioned above, reconnect may be a little buggy. It seems to work most of the time, but occasionally it decides to stop working. If that happens just shut the bot down and restart it.

Enjoy!

Saturday, February 16, 2008

Kon - Version 1.0.6 Alpha

With as many updates to Kon in the past few weeks I'm starting to think I should have renamed this blog to "Kon Updates." Seriously. Well, I can't help that I've been motivated to try and keep improving Kon.

Anyway, the alpha version of 1.0.6 source is now available in the /src-alpha/ folder. As a reminder, there will be no executable provided with alpha (or "in-testing" ) source and it may not be completely finished.

This version has had a lot of changes. So much, in fact, that I decided to finally start a change log. At this exact moment in time this is what I've done for version 1.0.6.

- Changed "brain.kon" to "kon.brain" in order to keep consistency later on (with new brain additions).
- AIML dll was updated by myself in order to try and improve memory management. The new dll MUST be used in order for this version of Kon to work correctly (it is included in the zip and in both src folders).
- Improved and fixed the PING/PONG so that it finally sends the correct information back
- Improved most of the IRC code. The ReceiveData() method now uses a combination of IF/ELSE and SWITCH statements to determine what the server messages are showing up (for example "PING" or "PRIVMSG", etc).
- Added multiple methods to handle various messages (QUIT method, PRIVMSG method, etc)
- Added a reconnect() method. ** It is in testing stages right now and may not work completely right.
- Added try/catch to the logger method to try and prevent certain errors
- Changed the way the log file works slightly to try and prevent exceptions and to just improve it
- submitting the user and nick are now in the authorize() method
- Fixed an exception that kept being thrown when quitting
- Removed the "full path" stuff from the main function when generating and reading the config file. This will hopefully stop a bug that keeps appearing.


Also, although unmentioned above, I believe this version of Kon uses less memory overall compared to previous versions. This is one of the reasons I had to go in and edit the AIML dll source. Mind you, toggling the AIML brain will cause a huge increase of RAM allocated for Kon (upwards to 60MB). Unloading it will not see an immediate decrease, but give it 5 minutes or so and you'll notice it will drop significantly. I have seen Kon use less than 1MB of RAM after ideling for awhile. Around 2MB is average for standard use without AIML.

Anyway, hopefully there will be more to come.

Monday, February 11, 2008

Kon - Version 1.0.5 Release

A few weeks ago I released the alpha version source for Kon version 1.0.5. Today I finished up everything that I wanted to accomplish for this version and released it.

Most of my goals for this version are done. I have separated Kon's brain from the AIML brain. I've also set up some checks so that it won't load the AIML unless the user wants to actually use the AIML. This frees up some memory (as it won't load all of the AIML files until they're needed). Unfortunately, when the user turns the AIML on for the first time it does take a little longer to load since the bot will have to then load all the files into memory. Due to how many AIML files the bot is using, it takes around 40 seconds on my machine (speed may vary).

GoogleBrain is disabled to start by default. This is because it's not quite as good as I had hoped. Sometimes it works beautifully, other times it leaves you scratching your head trying to decipher exactly what it was the bot pulled up. I'll try to improve it in the future.

The next version, however, I'm going to focus on setting it up so the bot owner can set up a list of users that can access the various bot commands (like !quit or toggling brains) via the config file.

Monday, January 28, 2008

Kon - Version 1.0.5 alpha

Phew. It's been an interesting past couple of days in the world of Kon. As you can see from the title, an alpha version of Version 1.0.5 is now up on the website. This version is in the process of changing the file structure around as well as introducing a brand new mode: Google Brain.

First let's talk about the file structure. In version 0.0.4 AIML and Kon's "monkey-see, monkey-do" brain are all in one file. I've decided that I needed to separate the two. I'm also trying to clean up IRC.cs and try to reduce memory necessary to run the bot. In the current version once AIML has been started it doesn't actually shut off, even if you use the command. With this version-in-works, the object should be destroyed manually when you toggle it. I've also gone and changed how the filters work and created their own source file for them. It makes it easier to keep track of and update.

Now for the majority of my headaches for the past 48 hours: Google Brain. I had an idea to improve Kon's AI: use a search engine to get a reply. The basic concept is that search engine results are not static and will change in time. Plus changing search terms may give you different results. Version 1.0.5 now introduces a mode that is designed to go out, search for the conversation term, then pull out some text to return. I should state right up front that THIS IS NOT PERFECT. In fact, sometimes it fails miserably. A lot of the time it ends up making Kon sound like a walking advertisement or a can of spam. However, in those rare moments that it works correctly it's beautiful.

You may be wondering why the version is 1.0.5 vs 0.0.4 of the last update. The reason being, I felt that this update (when it's 100% finished) is such a gigantic leap ahead that it deserves to be bumped up to an actual release version.

I've uploaded what I have under a /src-alpha/ folder. Download, compile and use these files at your own risk. They're still being worked on and probably aren't the most stable. I'll make another blog post in the future when I feel 1.0.5 is really done and is pretty stable.

So until then, here's some quotes from Kon running Google Brain.

<iyouboushi> kon: why is the rum gone?
<kon> to make a signal for the british
<iyouboushi> kon: a miserable little pile of secrets!
<kon> dracula to go back to ytmnd.
<iyouboushi> kon: the answer to life, the universe and everything
<kon> = 42. im not quite sure how
<iyouboushi> kon: multi-pong reply
<kon> omg liek thsi si,, liek, teh kewl8zt cmoic eva!!!111 rotfmao u haev 2 reed cuz it si teh whiet pnog palyzer onos!!!!1111 giren chuuch on

** Reminder: these results are probably atypical. Yes, Kon did display these on the first try but keep in mind it's searching Google for the result. You CAN get the same results if you repeat it enough, but it's equally likely that you'd get gibberish or an advertisement.

Saturday, January 19, 2008

Kon - Version 0.0.4

I've finally become unlazy enough to update Kon. In this update I've set up the code to generate and read a configuration file. From now on you can change the server, nicks, port and channel the bot will use within that config. It's in XML format, but I've made it pretty easy to read and understand.