Raised This Month: $1951 Target: $400
 487% 

MegaHAL ChatBot


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Afronanny
Veteran Member
Join Date: Aug 2009
Old 05-22-2011 , 23:46   MegaHAL ChatBot
Reply With Quote #1

MegaHAL Chatbot

After months of development and testing, I give you the Chatbot extension. This extension brings you the full artificial intelligence of MegaHAL. It sits around and listens and learns, and will reply to input from chat when you want it to.


Quote:
Purpose: To simulate a natural language conversation with a psychotic computer. This is achieved by learning from the user's input using a third-order Markov model on the word level. Words are considered to be sequences of characters separated by whitespace and punctuation. Replies are generated randomly based on a keyword, and they are scored using measures of surprise.

Download it here
Source code is here

Cvars:

sm_megahal_talk (Default: 0) - Chatbot will reply to all input from the chat.
sm_megahal_learn (Default: 1) - Chatbot will listen to all input from chat but not reply to it.
sm_megahal_replychance (Default: 0.75) - Chance that chatbot will generate a reply
sm_megahal_replywhenspokento (Default: 1) - Only reply when spoken to (may not reply if sm_megahal_replychance is not 1.0)
sm_megahal_botname (Default: ChatBot) - The name that MegaHAL will use when printing its reply to chat.

Credits:

Jason Hutchens - Author of MegaHAL
Afronanny - Putting it into an extension


Please give any crash info here or PM me with it.

Last edited by Afronanny; 05-25-2011 at 13:06.
Afronanny is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 05-23-2011 , 00:04   Re: MegaHAL ChatBot
Reply With Quote #2

Looks like guaranteed fun! GJ
Seta00 is offline
jasonfrog
Senior Member
Join Date: Mar 2008
Old 05-24-2011 , 09:33   Re: MegaHAL ChatBot
Reply With Quote #3

Have installed this on a Linux TF2 server. (I've checked the it's all loaded fine, no errors in error log either.)
Should the files in sourcemod/megahal-ext/ be updating and changing as MegaHAL learns?
If so, then they aren't for me. Where is what is learnt stored?

Last edited by jasonfrog; 05-24-2011 at 10:57.
jasonfrog is offline
jasonfrog
Senior Member
Join Date: Mar 2008
Old 05-24-2011 , 10:25   Re: MegaHAL ChatBot
Reply With Quote #4

It would be good if it ignored chat lines that started with either "!" or "/", as it's not so satisfying when it responses to triggers.
jasonfrog is offline
Afronanny
Veteran Member
Join Date: Aug 2009
Old 05-24-2011 , 13:02   Re: MegaHAL ChatBot
Reply With Quote #5

Quote:
Originally Posted by jasonfrog View Post
Have installed this on a Linux TF2 server. (I've checked the it's all loaded fine, no errors in error log either.)
Should the files in sourcemod/megahal-ext/ be updating and changing as MegaHAL learns?
If so, then they aren't for me. Where is what is learnt stored?
The files will only update when megahal exits. Everything else is stored in memory.


Also, try re-downloading the plugin. I added a check so it will not reply to chat commands.

Last edited by Afronanny; 05-24-2011 at 13:11.
Afronanny is offline
jasonfrog
Senior Member
Join Date: Mar 2008
Old 05-24-2011 , 13:39   Re: MegaHAL ChatBot
Reply With Quote #6

Quote:
Originally Posted by Afronanny View Post
The files will only update when megahal exits. Everything else is stored in memory.


Also, try re-downloading the plugin. I added a check so it will not reply to chat commands.
Perhaps I'm being a little silly here, but what makes megahal exit?

Thanks for making the update. I'm wondering, won't this make it ignore anything that contains an '!' anywhere, rather than at the beginning?
Code:
if (StrContains(arg1, "!") == 0 || StrContains(arg1, "/") == 0)
Maybe this instead?
Code:
new char = arg1[0];
if (char != '!' && char != '/')
jasonfrog is offline
Afronanny
Veteran Member
Join Date: Aug 2009
Old 05-24-2011 , 13:57   Re: MegaHAL ChatBot
Reply With Quote #7

No. StrContains returns the position of the character, or -1 if it isn't found.

Quote:
Originally Posted by jasonfrog View Post
Perhaps I'm being a little silly here, but what makes megahal exit?
Extension unload
Afronanny is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 05-25-2011 , 01:05   Re: MegaHAL ChatBot
Reply With Quote #8

So it basically never saves then. The only time that it would "unload" is when a server does a clean shut down or if the admin manually unloads it. If the server crashes, everything will be lost. You should dump the information regularly to prevent this from happening.
bl4nk is offline
Afronanny
Veteran Member
Join Date: Aug 2009
Old 05-25-2011 , 08:16   Re: MegaHAL ChatBot
Reply With Quote #9

Updated the extension and the plugin.
- Extension is now using actual version numbers
- Added the MH_Save native
- Plugin calls MH_Save on map end so that the MegaHAL brain is saved often
Afronanny is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 05-25-2011 , 11:40   Re: MegaHAL ChatBot
Reply With Quote #10

Seems like a good idea and concept but how do you work with it? Do you have it learn a fair but then let it talk or does it do it automatically? Can you make it so it doesn't respond to everything you say like if you just call it's name, it responds? Does it take up a slot? Sorry for all the questions.
__________________
Community: Vertex Heights | Discord: Drixevel#5049 (I sometimes accept commissions)
Drixevel is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:00.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode