PDA

View Full Version : AutoChat (In Dev)



xxpoopyxx
03-17-2013, 10:52 PM
VERSION "1" HAS BEEN UPDATED TO VERSION "2"


Spring break has ended for me :( i have to slow down with the project but dont worry it is still well alive! :)

Contributors so far : NKN, Valithor, shebee, emu, Justin, speedster, Gala, cause, [xol]

Hello everyone! i am developing an AutoChat script. currently i am hosting a website for people to add new words to my database for the chat i currently have around 128,000 words! After a good amount of words are added i can start the next half of my script to handle responses.

Please if you go to my site only input real words
I am desperately looking for more words!

The site: http://xxpoopyxx.no-ip.org
My Stream: http://www.twitch.tv/xxpoopyxx

Site Status (UP)
Stream Status (BANNED) At 4:20 pm Central time, 3/19/13
Why: according to twitch i was cheating and by making bots -'Promotion of illegal activities' i guess the first amendment doesn't exist anymore(Freedom of speech/press) Be careful whoever streams this stuff!!

Do not abuse my site.
My site may be down often around 10:00 am to 11:00 pm [Central time]
I will try to keep it up and running (unless i get shutdown by my isp)
Answer Key input will be coming soon!


Notice: I am the creator(xxpoopyxx} of this script and have mentioned users that have helped me along the way on my website. Say thank you to them!


Upcoming:
Version 3
-

Instructions:
IF THERE IS ANY PROBLEMS LET ME KNOW AND I WILL TRY TO FIX THEM
(This may depend the new 'SmartParams' and(or) 'Smart8')

1. Download the script [version 2] http://xxpoopyxx.no-ip.org/AutoChat 2.zip

(Temp download while website is off) https://dl.dropbox.com/u/76729571/AutoChat%202.zip

2. Recommended, log into world 3

3. As shown here: Set updates to true, draw to true, and 'TimesToTest' is the number of times it will collect messages in the chat

http://puu.sh/2l6Yx

5. As shown here: This is what a valid key looks like after it finds the correct words, you would enter that key '1103-65527' into the answer and key section on my
website

http://puu.sh/2l8Jt

6. As shown here: These are all the words it does not know, out of these words we would only add: 'doin', 'msg', 'sara', 'hween', 'santa', 'ty', 'ohh'

http://puu.sh/2l6ZJ

7. Tell everyone about this!!! And please contribute!!!


Please! Please! Please! use this script! all you have to do is run it and if it can't find a word then go to my website and add it! its that simple it can become a great community project and real increase anti ban for all scripts!!

rj
03-17-2013, 11:01 PM
How do you plan on making this work? can you show us some code? :s

xxpoopyxx
03-17-2013, 11:07 PM
ordinarily i would but i would like to release it when its done and out of beta!
the database is just to collect words then its imported into a text file and made into an array and if the bot finds all the words it generates a key. based on that key it is matched with an array of responses then it talks back! :)

Le Jingle
03-18-2013, 12:57 AM
I know of a few people who've worked on similar projects. :]
It's tons of fun to do, can't wait to see what you come up with, as there's many possibilities, it's just building and adding lines that makes one loose interest on these kinds of projects :p (think this is the story for wiz too haha)

xxpoopyxx
03-20-2013, 01:20 AM
Thanks keep an eye out for new releases

rj
03-20-2013, 01:30 AM
Make sure it does not respond 100% of the time I have seen things like this abused before, like once it talks once it should talk again for atleast 10-20 minutes unless it's a Jmod

xxpoopyxx
03-20-2013, 01:34 AM
sounds good! thanks for the input!

xxpoopyxx
03-20-2013, 01:53 AM
Let me know if anyone would like me to add anything for AutoChat!

xxpoopyxx
03-20-2013, 03:13 AM
Currently Working on version 2

Valithor
03-20-2013, 03:20 AM
Out of curiosity, can anyone confirm that the site is safe? and not a phishing site?

xxpoopyxx
03-20-2013, 03:32 AM
go to it and try it all it asks for is a word that you want to add to the database and a nickname to show me who is actually adding to the database!

xxpoopyxx
03-20-2013, 03:40 AM
Out of curiosity, can anyone confirm that the site is safe? and not a phishing site?

This is not a phishing site i have no intention of that what so ever.

Proof!

Thats before i tried to add a word
20025

Thats after i tried
20026

Valithor
03-20-2013, 03:52 AM
Do compound words count? or words that are... compounded... with a space in them? (don't remember the term at the moment)

example: toilet paper. Are you looking for words like that?

shebee
03-20-2013, 03:55 AM
AutoChat, as in it sends questions to a real person who can answer them?

Sin
03-20-2013, 04:02 AM
Good luck with this!

Valithor
03-20-2013, 04:06 AM
AutoChat, as in it sends questions to a real person who can answer them?

Yes shebee, it would seem that project is to make an auto-responder. I would be interested in seeing how he plans "respond".

+ 1 support

shebee
03-20-2013, 04:12 AM
I still don't get what you are trying to do.
Well I do get that you are trying to make some kind of an auto respond thing. Presumably monitoring the chat and comparing it to a database with questions and their answers?

You want me to just post words with my nick to your database?
What kind of words?

xxpoopyxx
03-20-2013, 04:16 AM
Everyone!! dont worry it will work!

Compound words will most likely be added in the future, at the moment yes word like "toilet", "paper".
No this will be all handled by the script. No other person involved.

The way it works is it takes the chat message and goes through an array of words, the it will get the index of each word and create a key. Next it will take that key and go through an array of of keys and find that key which can have multiple responses then it will pick one ans say it.

the arrays are made from text files containing words, the chat word list is about 128,000 words so far.
after that is filled i will hopefully get the communities help to input keys and answers on my website.

please keep the questions coming!! get more publicity here!! We need the communities help!

version 2 will be released soon if you are curious about the script code.

xxpoopyxx
03-20-2013, 04:18 AM
I still don't get what you are trying to do.
Well I do get that you are trying to make some kind of an auto respond thing. Presumably monitoring the chat and comparing it to a database with questions and their answers?

You want me to just post words with my nick to your database?
What kind of words?

yep thats exactly it! until i get enough words i wont release the responding part of the script. This has to be a community driven script.

and words like 'king' or 'maul' or 'monkeys' anything will work!

shebee
03-20-2013, 04:25 AM
I'm eager to see how you this will actually compare the keys and how and based on which circumstances it will respond.
How will the answers make sense?
If someone says Today is a good day, and then you just take random possible answers and say something like "Next week was b bad week" or some shit.

xxpoopyxx
03-20-2013, 04:30 AM
I'm eager to see how you this will actually compare the keys and how and based on which circumstances it will respond.
How will the answers make sense?
If someone says Today is a good day, and then you just take random possible answers and say something like "Next week was b bad week" or some shit.

yep any response you want!

Example;

if all those words are found in the array it will grab the index of each word and make a key like this

1234-5678-1235-33423-22234 (not real indexes)

the it will find that whole key in a different array that looks like this

1234-5678-1235-33423-22234 := ['Next week was b bad week','its a great day!','i agree']

then it will pick a random index and chat back to the person!

:)

xxpoopyxx
03-20-2013, 04:37 AM
nobody give up if your word is already added remember there is 128,000 words in my database! i think tomorrow i will work on the answer keys for the website and and release the new version of my script so anyone can find some keys and add them to the databse! :)

Justin
03-20-2013, 05:09 AM
nobody give up if your word is already added remember there is 128,000 words in my database! i think tomorrow i will work on the answer keys for the website and and release the new version of my script so anyone can find some keys and add them to the databse! :)

I'd be more then happy to host the site on my server if you wish for it to be online 24/7

xxpoopyxx
03-20-2013, 05:14 AM
I'd be more then happy to host the site on my server if you wish for it to be online 24/7


Ordinarily I would say yes but I don't know what domain name you have or server you provide and what cgi scripts it has. I may take you up on that though! Thanks!

Justin
03-20-2013, 05:18 AM
Ordinarily I would say yes but I don't know what domain name you have or server you provide and what cgi scripts it has. I may take you up on that though! Thanks!

http://puu.sh/2kHHi/5d9cbacf63

I own the server so I can put whatever you need on it. Disk space is only close to max because I haven't deleted old backups in awhile.


In need be, I can put you on this server;

http://puu.sh/2kHIV/974e62ba8a

xxpoopyxx
03-20-2013, 05:25 AM
http://puu.sh/2kHHi/5d9cbacf63

I own the server so I can put whatever you need on it. Disk space is only close to max because I haven't deleted old backups in awhile.


In need be, I can put you on this server;

http://puu.sh/2kHIV/974e62ba8a


Oh wow! I will probably do that! Thanks so much!

xxpoopyxx
03-20-2013, 05:28 AM
I went to that site, what were you hosting there?

Justin
03-20-2013, 06:14 AM
I went to that site, what were you hosting there?

Nothing, I only have the domain so I can access it without needing to remember the IP address

Benny
03-20-2013, 11:00 AM
Looks good. when i get the chance i'll chuck a couple words at it.

xxpoopyxx
03-20-2013, 03:43 PM
how did you get that domain anyway did you buy it or just host it yourself?

xxpoopyxx
03-20-2013, 03:44 PM
Looks good. when i get the chance i'll chuck a couple words at it.

Sweet thanks!!

xxpoopyxx
03-20-2013, 05:38 PM
VERSION 2 HAS BEEN RELEASED!!! Putting up a tutorial on main post soon!

xxpoopyxx
03-20-2013, 09:43 PM
Still working on some PHP for keys and answers! having some problems! i should be finished with it tonight or tomorrow. Keep those words coming!!!

rj
03-20-2013, 09:45 PM
Just voted no by accident.. can someone change it lol?

xxpoopyxx
03-20-2013, 09:48 PM
haha thats alright! can you actually change them? i will if i can!

rj
03-20-2013, 09:48 PM
Mods+ can I believe

xxpoopyxx
03-20-2013, 09:50 PM
hmmm wellllll then we need to find one i guess

xxpoopyxx
03-20-2013, 10:48 PM
Just added the keys and answers input for the website!! go try it!! adding tutorial next!!

xxpoopyxx
03-20-2013, 11:43 PM
Just added the tutorial!! Come check it out!!!

xxpoopyxx
03-21-2013, 12:07 AM
Le jingle and i have figured out more procedures that will be added to the second part of the script! wish us luck and help us out with words, keys, and answers!!

Le Jingle
03-21-2013, 12:47 AM
Le jingle and i have figured out more procedures that will be added to the second part of the script! wish us luck and help us out with words, keys, and answers!!

Just sharing what knowledge I have to help :)
Will try to look at your project a little more over the next week too,

Cheers
Lj

xxpoopyxx
03-21-2013, 12:56 AM
Just sharing what knowledge I have to help :)
Will try to look at your project a little more over the next week too,

Cheers
Lj


Thanks a bunch Le Jingle :)

Sawyer
03-21-2013, 01:40 AM
http://puu.sh/2kHHi/5d9cbacf63

I own the server so I can put whatever you need on it. Disk space is only close to max because I haven't deleted old backups in awhile.


In need be, I can put you on this server;

http://puu.sh/2kHIV/974e62ba8a
I wish my home internet had a 2 TB bandwidth...

xxpoopyxx
03-21-2013, 04:11 AM
I admit I've never seen so much before!

Remember this script relies on the community! with out it, it wont go anywhere!

Itankbots
03-21-2013, 06:44 AM
Amazing project man! I love how your keeping it community involved. Ill defintaly help add some stuff when i get free time, Currently very busy irl due to health issues, but i will defintaly find some time!

cause
03-21-2013, 05:32 PM
Very very cool project. So, if I understand how your script will run:

Random Person: "Hello" [Hello -> index # is 45 for example]
Script -> server: [45] (will the server or the script pick the return index?)
server -> [returns one of: "Hi", "Hello yourself", or "Sup"]
Script -> types out the returned response.

A couple of thoughts:
Who is going to go through and index proper responses? Seems like it would take a long time. (If opened to the community, I guess we could tackle it fairly quickly)

Also, the response procedure should be fairly generic for easy implementation into scripts (obvious but thought I'd mention :P ). Hmmm, the response procedure should also be able to return skill levels I would imagine.

Great project overall!
(Also, poops, please don't double post ;) )

EDIT: Also, to reduce server stress, maybe when the script sends a request to the server, it should include some type of randomization (random number between 1 and 9999 lets say, then add it up: ex. 435 = 4+3+5 = 12 then add up the return indexes, say, "Hi" => 923 = 9+2+3 = 14, "Hello yourself" => 243(hello) + 8421(yourself) = 8664 = 8+6+6+4 = 24, "Sup" => 78 = 7+8 = 15 THEN pick the number which is closest so, "Hi" when added up returns 14, so pick 14. This is just a suggestion to reduce load on the server, this would also mean that every word in your index should have its index number, and its index number added up. Hmmm well this is just a thought)

EDIT2: No, better idea, just send a random number between 0 and however long the index file is (145 000 words right?) and then just return the indexed result that is closest...wait no...this wouldn't work if words like "Hi" and "Hello" are closer together (since you probably added them close together). For this to work, you need to randomize the order of the words in the list...actually you could just setup a script to download the latest version to your computer, randomize it, then upload it again. On the other hand, I don't know how much stress picking a random number is on the server in which case it renders my whole train of thought null LOL.

EDIT3: Expanding on previous idea, you would not need to randomize the order of the list IF you assigned array numbers with a=1, b=2, c=3 etc... so "Hi" = 89 (h = 8, i = 9).

EDIT4: Also, potentially when you are indexing responses, assign different weights to the responses (a scale between 1-10?) So, give "Hi" a weight of 6, and "Hello yourself" a weight of 3, and "Sup" a weight of 4, then, add up the weights: 13, so "Hi" has a 6/13 chance of being said, where as "Sup" only a 4/13 chance. Since it seems that more often people say "Hi" instead of "Sup".

I was also thinking, we should try and make the word list a "Younger players" word list, it seems easier to pretend to be a younger player than an older player (potentially misspell harder words?)(hmmm maybe a separate procedure for determining if a word will be typed correctly or not)(this could also contribute to anti-ban, where you could specify at the beginning of the script (maybe a weighting process out of 10 again [maybe a 100]) that would determine how likely your player is to misspell words. (one person specifies a weight of 70, so their player is quite likely to misspell words vs a specification of say, 12, fairly unlikely to misspell a word.)(lol and to add to this, you could even have the script fix it's spelling mistakes:
Person: Hi
You: ho
You: *hi

that would look very human!!)

EDIT#watever: Does jagex still auto-capitalize and disallow all caps? I feel like there are numerous randomization options there

xxpoopyxx
03-21-2013, 08:50 PM
Very very cool project. So, if I understand how your script will run:

Random Person: "Hello" [Hello -> index # is 45 for example]
Script -> server: [45] (will the server or the script pick the return index?)
server -> [returns one of: "Hi", "Hello yourself", or "Sup"]
Script -> types out the returned response.

A couple of thoughts:
Who is going to go through and index proper responses? Seems like it would take a long time. (If opened to the community, I guess we could tackle it fairly quickly)

Also, the response procedure should be fairly generic for easy implementation into scripts (obvious but thought I'd mention :P ). Hmmm, the response procedure should also be able to return skill levels I would imagine.

Great project overall!
(Also, poops, please don't double post ;) )

EDIT: Also, to reduce server stress, maybe when the script sends a request to the server, it should include some type of randomization (random number between 1 and 9999 lets say, then add it up: ex. 435 = 4+3+5 = 12 then add up the return indexes, say, "Hi" => 923 = 9+2+3 = 14, "Hello yourself" => 243(hello) + 8421(yourself) = 8664 = 8+6+6+4 = 24, "Sup" => 78 = 7+8 = 15 THEN pick the number which is closest so, "Hi" when added up returns 14, so pick 14. This is just a suggestion to reduce load on the server, this would also mean that every word in your index should have its index number, and its index number added up. Hmmm well this is just a thought)

EDIT2: No, better idea, just send a random number between 0 and however long the index file is (145 000 words right?) and then just return the indexed result that is closest...wait no...this wouldn't work if words like "Hi" and "Hello" are closer together (since you probably added them close together). For this to work, you need to randomize the order of the words in the list...actually you could just setup a script to download the latest version to your computer, randomize it, then upload it again. On the other hand, I don't know how much stress picking a random number is on the server in which case it renders my whole train of thought null LOL.

EDIT3: Expanding on previous idea, you would not need to randomize the order of the list IF you assigned array numbers with a=1, b=2, c=3 etc... so "Hi" = 89 (h = 8, i = 9).

EDIT4: Also, potentially when you are indexing responses, assign different weights to the responses (a scale between 1-10?) So, give "Hi" a weight of 6, and "Hello yourself" a weight of 3, and "Sup" a weight of 4, then, add up the weights: 13, so "Hi" has a 6/13 chance of being said, where as "Sup" only a 4/13 chance. Since it seems that more often people say "Hi" instead of "Sup".

I was also thinking, we should try and make the word list a "Younger players" word list, it seems easier to pretend to be a younger player than an older player (potentially misspell harder words?)(hmmm maybe a separate procedure for determining if a word will be typed correctly or not)(this could also contribute to anti-ban, where you could specify at the beginning of the script (maybe a weighting process out of 10 again [maybe a 100]) that would determine how likely your player is to misspell words. (one person specifies a weight of 70, so their player is quite likely to misspell words vs a specification of say, 12, fairly unlikely to misspell a word.)(lol and to add to this, you could even have the script fix it's spelling mistakes:
Person: Hi
You: ho
You: *hi

that would look very human!!)

EDIT#watever: Does jagex still auto-capitalize and disallow all caps? I feel like there are numerous randomization options there

i recently talked with some people that gave me ideas on some better ways to process info so i will keep this way and add the other after i figoure out how it will work!

the way this works is basically they way you said except its reading from a text file to speed up the process not the server :)

it will take a sentence some one says and break that sentence into an array then go through each word in that array and compare it to a text file, after it compares each word it will fetch the index of each word and generate a key, after that the key is compared with others that have responses like hi, or hello.

so if the sentence is 'hi how are you'
then it will make an array ['hi', 'how', are', 'you']
then it will pick the first index of that array which is 'hi'
then it goes through a text file to find the word 'hi' then returns the index in the text file

so for example hi could equal the index of 2345

so it does that for each word and generates a key based on the indexes
Example:
2345-6789-12345-678

then that key is compared to another text file with a list of keys and if it finds that key in there then it will take a responses form that key

the keys look like this
2345-6789-12345-678 := ['im good', 'great', 'fine']

then it will pick a random response and say it :)

the new way that it should be done is with with relations built upon the sentences said, and having key words and all that other good stuff :)

the user 'core' has suggested that to me and agreed to help out when he can! so also thank core for helping, and the rest of the community for contributing :)

cause
03-21-2013, 09:20 PM
i recently talked with some people that gave me ideas on some better ways to process info so i will keep this way and add the other after i figoure out how it will work!

the way this works is basically they way you said except its reading from a text file to speed up the process not the server :)

it will take a sentence some one says and break that sentence into an array then go through each word in that array and compare it to a text file, after it compares each word it will fetch the index of each word and generate a key, after that the key is compared with others that have responses like hi, or hello.

so if the sentence is 'hi how are you'
then it will make an array ['hi', 'how', are', 'you']
then it will pick the first index of that array which is 'hi'
then it goes through a text file to find the word 'hi' then returns the index in the text file

so for example hi could equal the index of 2345

so it does that for each word and generates a key based on the indexes
Example:
2345-6789-12345-678

then that key is compared to another text file with a list of keys and if it finds that key in there then it will take a responses form that key

the keys look like this
2345-6789-12345-678 := ['im good', 'great', 'fine']

then it will pick a random response and say it :)

the new way that it should be done is with with relations built upon the sentences said, and having key words and all that other good stuff :)

the user 'core' has suggested that to me and agreed to help out when he can! so also thank core for helping, and the rest of the community for contributing :)

Ok so are you building some type of sentence breakdown engine, or are you looking for predefined questions.
Like: "hi how are you", is both a greeting and a question...how would you decipher this?
What if I said: "whatsup, also, hi" ? That is definitely not going to be a pre-defined question.

xxpoopyxx
03-22-2013, 03:34 AM
Ok so are you building some type of sentence breakdown engine, or are you looking for predefined questions.
Like: "hi how are you", is both a greeting and a question...how would you decipher this?
What if I said: "whatsup, also, hi" ? That is definitely not going to be a pre-defined question.

the beggining of this script is pre defined questions that are compared with an array of answer keys the better way to do this which i will is to use keywords and relations with a self generating database basically :)

cause
03-22-2013, 05:15 PM
the beggining of this script is pre defined questions that are compared with an array of answer keys the better way to do this which i will is to use keywords and relations with a self generating database basically :)

Ok I see. Once you have a delivery system made I can help with randomization.

xxpoopyxx
03-22-2013, 06:26 PM
Ok I see. Once you have a delivery system made I can help with randomization.

Okay sweet!!! thanks

xxpoopyxx
03-22-2013, 10:25 PM
As of now i am begging an alternative route to the way the script collects data and uses it to respond, thus a brain!

more info will be released later on :)

xxpoopyxx
03-26-2013, 02:29 AM
Spring break has ended for me :( which means i will have to slow the project but i will still be communicating here maybe a few times a week

Toby1
03-26-2013, 06:29 PM
I have some problems loading the website :\. I love the idea of this! I will contribute when/if I can get on


The connection has timed out

The server at 173.216.39.233 is taking too long to respond.

xxpoopyxx
03-26-2013, 09:21 PM
I have some problems loading the website :\. I love the idea of this! I will contribute when/if I can get on


The connection has timed out





the site will be down here and there :/

cause
03-27-2013, 01:09 AM
the site will be down here and there :/

You should take Justin up on his hosting offer.

rj
03-27-2013, 09:50 AM
You should upload the script here -.-

xtrapsp
03-27-2013, 10:13 AM
if (Scriptupload = True) then
writeln('Not lying');
else
writeln('LIAR, BURN HIM BUUURRRN HIM');

I'm pretty sure I worked on something like this a while ago, I can dig some of it out if u want?

[XoL]
03-27-2013, 07:31 PM
If you can get this big enough I wonder if Wizzup etc. would mind hosting it, cause if they host it chances are it will never go down and we could all view source etc. at all times keep it in constant development.

xxpoopyxx
03-27-2013, 09:47 PM
You should upload the script here -.-

The script and information is located on the first page of this thread :)

xxpoopyxx
03-27-2013, 09:50 PM
;1206711']If you can get this big enough I wonder if Wizzup etc. would mind hosting it, cause if they host it chances are it will never go down and we could all view source etc. at all times keep it in constant development.

i would ask but currently i am back in school so this project is slowing down. Also the way i am doing this now is not they best logical way its just matching questions that have a set answer(s) so before i host for a while i would like to make an alternative part to this script that is logical, literally a chat bot :)

No worries this will not die it will just be very slow for a bit! on the weekends it will pick up :)

rj
03-27-2013, 09:54 PM
The script and information is located on the first page of this thread :)

website has a lot of downtime -.-

xxpoopyxx
03-27-2013, 10:02 PM
website has a lot of downtime -.-

go look again it wont download because its offline! i just put a temp download on there

Kave
04-03-2013, 01:26 PM
http://www.cleverscript.com/CSL/CleverScriptManual.pdf
http://www.cleverscript.com/

Seems CleverBot has gone API mode! You would have to use it specifically in testing though as to publish it publicly and use it costs credits.

Le Jingle
04-04-2013, 06:47 AM
Found a way to improve your script immensely via making a BinarySearch instead of InStrArrEx. Muuuuch faster. :) xxpoopyxx;

Edit:
Also, not sure if this would be a bigger library for you, but http://dumps.wikimedia.org/enwiktionary/latest/ has some large files

xxpoopyxx
04-05-2013, 12:09 AM
http://www.cleverscript.com/CSL/CleverScriptManual.pdf
http://www.cleverscript.com/

Seems CleverBot has gone API mode! You would have to use it specifically in testing though as to publish it publicly and use it costs credits.


wow! alright!! sweet i will definitely take a look at that thanks! :)

xxpoopyxx
04-05-2013, 12:10 AM
Found a way to improve your script immensely via making a BinarySearch instead of InStrArrEx. Muuuuch faster. :) xxpoopyxx;

Edit:
Also, not sure if this would be a bigger library for you, but http://dumps.wikimedia.org/enwiktionary/latest/ has some large files

Thanks! i will look into and i hope you dont mind but i will definitely ask you some questions about it and for some help! :)

xxpoopyxx
04-05-2013, 12:11 AM
Sorry for being slow to respond and work on the project i have been very busy lately! but no worries this weekend work will continue :)