AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Extensions (https://forums.alliedmods.net/forumdisplay.php?f=134)
-   -   MegaHAL ChatBot (https://forums.alliedmods.net/showthread.php?t=157540)

Afronanny 05-22-2011 23:46

MegaHAL ChatBot
 
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.

Seta00 05-23-2011 00:04

Re: MegaHAL ChatBot
 
Looks like guaranteed fun! GJ :)

jasonfrog 05-24-2011 09:33

Re: MegaHAL ChatBot
 
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?

jasonfrog 05-24-2011 10:25

Re: MegaHAL ChatBot
 
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.

Afronanny 05-24-2011 13:02

Re: MegaHAL ChatBot
 
Quote:

Originally Posted by jasonfrog (Post 1474683)
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.

jasonfrog 05-24-2011 13:39

Re: MegaHAL ChatBot
 
Quote:

Originally Posted by Afronanny (Post 1474807)
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 != '/')


Afronanny 05-24-2011 13:57

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

Quote:

Originally Posted by jasonfrog (Post 1474821)
Perhaps I'm being a little silly here, but what makes megahal exit?

Extension unload

bl4nk 05-25-2011 01:05

Re: MegaHAL ChatBot
 
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.

Afronanny 05-25-2011 08:16

Re: MegaHAL ChatBot
 
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

Drixevel 05-25-2011 11:40

Re: MegaHAL ChatBot
 
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. :3


All times are GMT -4. The time now is 01:43.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.