• Chat Bot - Somewhat Comprehensible
    80 replies, posted
Here's v1.3 of the chat bot... Probably the final too. I tried my best to make the bot speak somewhat fluent English, although the English language has so many intricacies that make it impossible to create a completely smart and articulate chat bot. You can look through my code if you think there's some more words you can add to my libraries that might help the bot make better decisions of what words to memorize. Words are memorized based on the word spoken before them. This means that if i were to say "This is a bicycle", the bot would memorize the word "bicycle". [b]Working features:[/b] -Saving and loading noun, verb, subject, and adjective libraries. -Automatic library saving, as well as automatic bot chatting. -Bot learns from what players say. -Bot has different responses for different phrases. -Admin controlled variables (type cbot_ in your console to see the commands.) [b]Important admin variables:[/b] [lua]Bot.Admin.ChatFreq = 200 //How many seconds should the bot wait before automatically chatting? Make this 0 to disable auto-chatting. Bot.Admin.WaitFreq = 10 //How long must the bot wait after it has chatted before it can reply to someone again? Bot.Admin.LearnFreq = 3 //How many people must speak before the bot updates its libraries? Keep this number higher than 1 to avoid lag. Bot.Admin.SaveFreq = 400 //How many seconds should the bot wait before it writes its newly acquired libraries to the data directory? Bot.Admin.Name = "Garry" //The name of the bot, lolz.[/lua] No screens since it's just a bot that chats. [b]Installing:[/b] Unzip to your Gmod folder. Easy, no? When you first start talking with the bot, his vocabulary will be pretty shitty. You have to talk for a while before it begins to learn from you. [url=http://www.garrysmod.org/downloads/?a=view&id=21547][img]http://www.garrysmod.org/img/?t=dll&id=21547[/img][/url]
Do I still "has sad car now I sad?" If so sweet. [B]Edit[/B] I almost have one of every rating for this post!
[QUOTE=Termy58]Do I still "has sad car now I sad?" If so sweet.[/QUOTE] The rating on your post makes me just a little disappointed in Megiddo... In any case, great work. This thing makes me laugh hard :D
[QUOTE=Elspin]The rating on your post makes me just a little disappointed in Megiddo... In any case, great work. This thing makes me laugh hard :D[/QUOTE] He was probably joking around. It's just a rating. At SexCave: Could you please post a changelog from v1.2 to v1.3? [b]Edit:[/b] [code] SERVER: ERROR: Hook 'ChatBot_Listen' Failed: includes/extensions/string.lua:35: bad argument #1 to 'concat' (table contains non-strings) SERVER: Removing Hook 'ChatBot_Listen' [/code] Is this caused by weird letters in the library? [b]Edit:[/b] I removed all weird symbols in my library, and it's still broken.
I'll have to look into that. I haven't received that error yet. Try reverting to the default library.
It works. I don't know what's causing it with my library. I went through it to find weird symbols, but still no luck. Should I remove numbers as well? [b]Edit:[/b] It did say something when I joined, but after that, it didn't respond [code] CapsAdmin: nils CapsAdmin: nils CapsAdmin: nils CapsAdmin: nils CapsAdmin: nils CapsAdmin: nils CapsAdmin: nils, where is qiler? CapsAdmin: nils, where is qiler? CapsAdmin: Nils, where is Qiler? CapsAdmin: Nils, where is Qiler CapsAdmin: Nils, where is Qiler? SERVER: ERROR: Hook 'ChatBot_Listen' Failed: includes/extensions/string.lua:35: bad argument #1 to 'concat' (table contains non-strings) SERVER: Removing Hook 'ChatBot_Listen' CapsAdmin: NILS CapsAdmin: NILS CapsAdmin: nils answer me CapsAdmin: nils answer me CapsAdmin: nils answer me CapsAdmin: nils where is qiler? Wrote to chat-bot libraries successfully! [/code] [b]Edit:[/b] It seems to break as soon as you type weird symbols in the chat. Or if it tries to load one.
What symbols are you using? I'll have to make a table of them and strip the text of any strange symbols.
I'm not sure. I think ' breaks it. Let me try again. [b]Edit:[/b] Yep. ANY symbol seems to break it. I'd make a list of symbols it should allow. Anything else shouldn't be allowed [lua] "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" [/lua] Something like that. [b]Edit:[/b] Or.. I'm not sure actually, it just randomly breaks.
Cool
What the fuck... In theory you should not be getting any problems: [lua]table.insert(Bot.CLib.Verbs,Bot.Trim(tbltext[k+1]))[/lua] Bot.Trim is a function i made that removes all punctuation from a word. There should not be any strange symbols in the libraries since the words are checked before they get written. :raise: Unless the symbols you're using are not contained within the Bot.Lib.Punctuation library: [lua]Bot.Lib.Punctuation = {",", ".", "-", ":", ";", "_", "?", "!"}[/lua]
[QUOTE=SexCave]What the fuck... In theory you should not be getting any problems: [lua]table.insert(Bot.CLib.Verbs,Bot.Trim(tbltext[k+1]))[/lua] Bot.Trim is a function i made that removes all punctuation from a word. There should not be any strange symbols in the libraries since the words are checked before they get written. :raise: Unless the symbols you're using are not contained within the Bot.Lib.Punctuation library: [lua]Bot.Lib.Punctuation = {",", ".", "-", ":", ";", "_", "?", "!"}[/lua][/QUOTE] Oh there's a lot more symbols then that. Make a list of all the letters that are acceptable. There's probably thousands of weird symbols out there.
[QUOTE=CapsAdmin]Oh there's a lot more symbols then that. Make a list of all the letters that are acceptable. There's probably thousands of weird symbols out there.[/QUOTE] Otherly known as, CHARACTER MAP CHECK PLEASE. But yes, over NINE THOUSAND!! weird symbols from all different languages, in all different fonts.
I always loved the sad cars, it was like having a 3 year old without it jumping on you when your about to throw up.
Okay I'll have to reverse the blacklist and make a whitelist. Goddamn invalid characters. :argh:
Hope you get it fixed soon. good job when it does work though. Blimp: kick my dog can't kick.
[QUOTE=SnamSniffUm]Hope you get it fixed soon. good job when it does work though. Blimp: kick my dog can't kick.[/QUOTE] if only it could type better oh well, lua scripts make sentances like drunk mingebags on crack anyways ( better luck just making a robot that doesn't talk at all )
[QUOTE=J!NX]if only it could type better[/QUOTE] But that's half the fun of it!
Difference what speak normal?
also, is anyone else having trouble with him not responding when you say his name? With me its random sentences.
I don't know if this works in Lua, but you could probably get him to only accept characters if you do a check like this: (this is psuedo code) [code]if ((character < a) or (character > z)) and ((character < A) or (character > Z)) omit character as punctuation else allow character[/code]
[QUOTE=PiedotTaste]I don't know if this works in Lua, but you could probably get him to only accept characters if you do a check like this: (this is psuedo code) [code]if ((character < a) or (character > z)) and ((character < A) or (character > Z)) omit character as punctuation else allow character[/code][/QUOTE] He's already working on it.
Okay guys i think i fixed it... I'll post a new link very soon. I wanna make sure there are no symbol issues anymore.
Any chatlog?
In early versions, when I'd play on public servers, if I'd check console once in a while, it'll say: [code]Wrote to chat-bot libraries successfully![/code] Does it learn even if you're not on Singleplayer/Dedicated Server? Anyways, looks decent.
For some reason my script explodes only when i say bad words to the bot. So i'll have to fix that first.
[QUOTE=SexCave]For some reason my script explodes only when i say bad words to the bot. So i'll have to fix that first.[/QUOTE] Solution; Be nice to chatbot or it will suicide!!!
Uhh... [quote]ch3: gayry ch3: hi ch3: hi gayry Gayry: hi ch3, we can't jump for their car are cool. Gayry: a cool mother. Gayry: those cat won't laugh but his blue. ch3: you suck Gayry: then mad bug isn't my cat. Gayry: gets to cry their bug weren't sad dog. ch3: wait, what Gayry: gets to suck after car could kick yet sad. Gayry: happy mother aren't some car lol nor that mad. ch3: shut up Gayry: mad car laugh because mad mother likes to laugh until mad. Gayry: suck some happy. ch3: fuck fuck fuck Gayry: then smart father laugh. Gayry: fish are some cool car not her cat let's cry. Gayry: die yet mad father die nor mad. Gayry: cool car are an cool dog not your blue. Gayry: won't kick yet fish won't laugh. Gayry: dog let's kick for mother couldn't jump your blue. Gayry: weren't any blue mother are blue cat are mad. Gayry: laugh since happy cat is sad. Gayry: bug lol a cool. Gayry: until steam i'll laugh since some mad fish. Gayry: won't lol until mad. Gayry: the blue father cry because mad father. Gayry: although your cat won't suck or dog could die. Gayry: smart father not happy dog were brown. Gayry: were an mad father wasn't dumb. Gayry: not mad fish let's laugh after some car. Gayry: the mother wasn't a car wasn't cool. ch3: gayry stop Gayry: then the mother should kick. Gayry: cat should laugh an father let's die. Gayry: they'll die for smart dog aren't her bug. Gayry: i'll laugh for happy steam shouldn't cry your cool. Gayry: fish weren't blue steam could cry until mother is dumb. Gayry: mother gets to kick that car. Gayry: gets to kick unless dog will kick after dumb. ch3: stop ffs Gayry: shouldn't lol after brown. Gayry: steam are cool fish. Gayry: a cat is an cool dog am my sad. Gayry: kick unless a sad mother laugh then sad. Gayry: cat jump any mother wants to kick my mad. Gayry: my cat are those fish cry an bug cry. Gayry: bug should die that brown cat isn't that smart. Gayry: am a cat to jump. Gayry: mother wants to lol my bug were dumb. Gayry: my dog can't cry since brown. Gayry: can die unless father. Gayry: lol so his bug weren't happy mother. Gayry: cat couldn't suck nor an fish he'll cry so sad. Gayry: cat let's laugh. Gayry: your dumb steam. Gayry: father not smart dog wasn't those dog are their brown. Gayry: he'll die after sad car should jump his father. Gayry: can cry since that fish we'll laugh because happy. Gayry: cry unless her sad bug will jump their blue. Gayry: bug is dumb mother can suck. Gayry: i'll cry since dog can kick. Gayry: dog can't laugh then car. Gayry: happy fish was happy father likes to laugh. Gayry: since cat we'll lol nor dumb. Gayry: jump a steam are an car. Gayry: bug isn't brown car. Gayry: dog let's cry the sad. Gayry: her steam can't jump her mad. Gayry: father won't laugh a cool car can't jump. Gayry: can kick a bug laugh. Gayry: her car gets to kick. Gayry: cat lol after sad. Gayry: father won't laugh the sad car was my dog. Gayry: father die some smart car shouldn't kick their steam. Gayry: bug shouldn't die those happy. Gayry: am your dumb father die any bug. Gayry: she'll lol some bug won't lol but fish could suck. Gayry: car isn't your cat is that brown. Gayry: because blue father suck. Gayry: gets to cry for blue. Gayry: father wants to kick yet the father not brown car. Gayry: will laugh the smart fish aren't any blue. Gayry: car isn't her blue steam jump. Gayry: car gets to laugh their cool fish he'll die. Gayry: won't die nor the bug die yet car should lol. Gayry: car likes to kick after mother. Gayry: not her steam are dumb. Gayry: unless happy bug not dumb dog are dumb. Gayry: mad dog can't laugh. Gayry: dog die her dumb car. Gayry: we'll cry some steam can laugh since father. Gayry: bug are blue car won't laugh unless dumb. Gayry: the mother likes to kick. Gayry: wants to laugh her steam was mad. Gayry: gets to suck his mad father were your happy. Gayry: dog lol his steam is those father not happy. Gayry: although her mother. Gayry: fish suck any car cry an smart steam. Gayry: that dog we'll cry those bug. Gayry: jump then a fish wasn't happy. Gayry: cat they'll die any cool. Gayry: blue bug can't lol although smart mother die or smart. Gayry: since a fish. Gayry: since mad bug won't kick for blue. Gayry: not any cat can laugh. Gayry: aren't her mad father. Gayry: her cool cat won't suck those steam isn't smart. Gayry: blue mother they'll laugh her dog laugh any sad. Gayry: steam won't suck a car. Gayry: cry yet dog aren't happy father was sad. Gayry: is some smart dog wasn't smart dog will cry. Gayry: couldn't suck and dog will cry. Gayry: sad father aren't his sad bug are smart car. Gayry: bug likes to laugh then the car won't lol. Gayry: so her cool car shouldn't cry your car aren't dumb. Gayry: gets to suck their cat let's cry since dumb. Gayry: happy mother wasn't mad. Gayry: dog will die. Gayry: isn't your mother die unless bug are a dumb. Gayry: mother couldn't cry. Gayry: fish can't suck nor mad bug. Gayry: they'll die a bug laugh. Gayry: steam will kick your smart dog. Gayry: laugh the car lol but a dog can kick. Gayry: lol her dog i'll lol. Gayry: mother weren't dumb fish can't cry. Gayry: could suck your mad fish kick your happy. Gayry: can die some fish. Gayry: cat suck some car gets to jump although fish. Gayry: couldn't kick your mother they'll laugh until cat likes to lol. Gayry: let's kick their bug i'll lol any bug. Gayry: father should laugh her mother should lol. Gayry: father was mad bug. Gayry: any father we'll die. Gayry: a brown steam can't jump nor cat were mad. Gayry: shouldn't kick his brown. Gayry: steam they'll jump so that cat won't lol. Gayry: then blue mother lol because blue father. Gayry: likes to jump the fish we'll lol some smart. Gayry: any dumb bug shouldn't suck. Gayry: not dumb mother weren't dumb dog gets to laugh. Gayry: steam aren't those mother can jump. Gayry: will laugh because bug wasn't his happy. Gayry: he'll die because sad father are their fish. Gayry: steam shouldn't laugh his fish. Gayry: after their mother could kick. Gayry: could cry after your brown car will laugh so sad. Gayry: kick an dog am brown. Gayry: brown fish gets to laugh yet an fish. Gayry: jump after your sad bug cry the mad. Gayry: cool father should die any sad mother. Gayry: laugh the blue steam gets to lol until sad. Gayry: is the sad car are dumb father was some brown. Gayry: steam die after car will kick. Gayry: for bug is those cat am sad fish can kick. Gayry: likes to lol an happy. Gayry: she'll laugh yet happy. Gayry: since smart fish die some smart. Gayry: her cat wasn't his bug. Gayry: her father i'll lol her car was sad. Gayry: steam can't die. Gayry: wasn't her fish weren't dumb mother. Gayry: after some dog can jump your father. Gayry: to cry although dog they'll laugh a car. Gayry: is blue steam likes to jump her bug. Gayry: can lol for any sad. Gayry: dog are cool cat weren't any blue mother. Gayry: gets to suck yet car were dumb. Gayry: die your steam. Gayry: jump those father laugh the steam are blue fish. Gayry: cat lol their father were his mad. Gayry: bug gets to laugh. Gayry: i'll jump the brown car weren't cool cat won't lol. Gayry: mad fish i'll suck but that mad car. Gayry: father are dumb. Gayry: sad cat will laugh then the mother. Gayry: mad dog is smart. Gayry: likes to die your steam gets to die because his dumb. Gayry: steam wants to laugh yet car will suck the blue. Gayry: let's kick then blue. Gayry: are smart mother. Gayry: father lol but smart dog kick their dog cry. Gayry: sad car can cry. Gayry: until an bug wants to lol. Gayry: kick and happy steam. Gayry: she'll suck yet my brown bug. Gayry: dog likes to kick yet cool father jump until bug. Gayry: but the cat die. Gayry: dog can laugh the dumb dog. Gayry: but some father won't jump. Gayry: is smart steam. Gayry: fish not brown fish jump her cat. Gayry: cat are blue. Gayry: shouldn't lol or bug. Gayry: smart steam weren't happy. Gayry: dog am that happy. Gayry: are blue dog will
Oh shit I laughted the shit out of me because of those. [code] mad car laugh because mad mother likes to laugh until mad.[/code] [code]the blue father cry because mad father.[/code] [code]wasn't her fish weren't dumb mother[/code]
NOES! [code] gayry: bug wasn't happy car to kick an sad. noclip OFF <CONNOR> conman420 -> said "hi gayry" <CONNOR> conman420: hi gayry gayry: sup <CONNOR> conman420, we will kick and any cat won't die. noclip ON noclip OFF <CONNOR> conman420 -> said "lol gayry is hilarious" ERROR: Hook 'ChatBot_Listen' Failed: includes/extensions/string.lua:35: bad argument #1 to 'concat' (table contains non-strings) Removing Hook 'ChatBot_Listen' <CONNOR> conman420: lol gayry is hilarious [/code] Seems to happen when you mention the bots name.
[QUOTE=-Ch3G3\/4r4-]Uhh...[/QUOTE] [quote]"Gayry: laugh since happy cat is sad."[/quote] This bot has disrespected NEDM,and must be terminated :v:
Sorry, you need to Log In to post a reply to this thread.