vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   TomBot v1.1 vB AI User Bot (https://vborg.vbsupport.ru/showthread.php?t=48053)

NuclioN 01-27-2003 01:00 PM

enable html would solve this quick but that's not an option i guess. ;)

NuclioN 01-27-2003 01:10 PM

I've tried to figure out how to let the tombot act in the VBchat/shoutbox but that's to complicated for me. It is possible, i'm sure but the INSERT into shoutbox must have it's own code and obviously some new tables in the shoutbox on mysql. It would be awesome though if someone could do this. :)

The Aiml is relative easy to learn and it would be great if someone or a group would make a FAQ bot. It's timeconsuming but once set your forum would gain in interactivity and fun.
If an English aiml is ready to perform tasks for Vbulletin then i will translate it into Dutch and release it.

fury 01-27-2003 01:49 PM

The bot used to answer most of my questions but now unless it's something like "Hello, Tux." (Tux is the name of my bot), all it replies with is a smilie.

http://www.otcentral.com/forum/showt...&pagenumber=46

http://www.otcentral.com/forum/showt...pagenumber=159

(scroll down to about the middle of the page on both links, I only just installed him at about 10:00)

Read the first link, and then the second link (both that page and the next one), see how his answers degraded from almost-complex retaliatory questions to nothing but smilies?

Radgam 01-27-2003 02:25 PM

Quote:

Originally posted by NuclioN
enable html would solve this quick but that's not an option i guess. ;)
do you think i want my forum hacked? :D I quess it would be possible to find some sort of find/replace so <br> s = /n s?

nuno 01-27-2003 02:42 PM

Quote:

Originally posted by fury
The bot used to answer most of my questions but now unless it's something like "Hello, Tux." (Tux is the name of my bot), all it replies with is a smilie.

http://www.otcentral.com/forum/showt...&pagenumber=46

http://www.otcentral.com/forum/showt...pagenumber=159

(scroll down to about the middle of the page on both links, I only just installed him at about 10:00)

Read the first link, and then the second link (both that page and the next one), see how his answers degraded from almost-complex retaliatory questions to nothing but smilies?

@fury
Maybe it's calling the wrong bot id number.
Check your db. ;)

fury 01-27-2003 03:21 PM

Nope, the bot ID was wrong but I changed that and no effect.

nuno 01-27-2003 03:25 PM

http://www.otcentral.com/forum/alice.../jsrschat.html
hmmmm
I get no answer from your bot
Is he mad? :D

TECK 01-27-2003 03:26 PM

Quote:

Originally posted by Radgam
is there a way to stop the bot adding <br> s to posts?
Code:

$string = preg_replace( '~<br />~' , '' , $string );

Radgam 01-27-2003 03:27 PM

My bot keeps say "What is living in canada like living in
canada?" when i say i live in canada. Notice he says the same things twice? does anyone with ai knowledge how how to sort that? ;) I looked through the AIML files but they seem fine :/

N9ne 01-27-2003 03:44 PM

My bot has almost 800 posts now....in about 20 hours this bot forum has added over 2000 posts to my forum, 800 of which are from the bot...

drumsy 01-27-2003 04:00 PM

How do I undo the SQL commands that I ran from db.sql? I'm encountering problems with safemode and it's becoming to much of a pain to work with.

fury 01-27-2003 04:05 PM

Quote:

Originally posted by TECK
Code:

$string = preg_replace( '~<br />~' , '' , $string );

There's also the much faster method of str_replace('<br />' , '', $string );

Mijae 01-27-2003 06:25 PM

He wont answer anything but smilies. I used ManagerJosh's technique to upload the files because I have PHP in safe mode.

Also, all files did upload except the D.aiml and I have 34449 entries, not 41125.

Help me? :P

JBMoney 01-27-2003 06:31 PM

I get this at the end of running botloader.php. What did I do wrong?

Quote:

Warning: fopen(subs.inc) [function.fopen]: failed to create stream: Permission denied in /home2/www/bushwhacked/forum/alice/src/admin/botloaderfuncs.php on line 85

Warning: fwrite(): supplied argument is not a valid stream resource in /home2/www/bushwhacked/forum/alice/src/admin/botloaderfuncs.php on line 77

Warning: fwrite(): supplied argument is not a valid stream resource in /home2/www/bushwhacked/forum/alice/src/admin/botloaderfuncs.php on line 77

Warning: fwrite(): supplied argument is not a valid stream resource in /home2/www/bushwhacked/forum/alice/src/admin/botloaderfuncs.php on line 77

Warning: fwrite(): supplied argument is not a valid stream resource in /home2/www/bushwhacked/forum/alice/src/admin/botloaderfuncs.php on line 77

Warning: fwrite(): supplied argument is not a valid stream resource in /home2/www/bushwhacked/forum/alice/src/admin/botloaderfuncs.php on line 77

Warning: fwrite(): supplied argument is not a valid stream resource in /home2/www/bushwhacked/forum/alice/src/admin/botloaderfuncs.php on line 77

Warning: fwrite(): supplied argument is not a valid stream resource in /home2/www/bushwhacked/forum/alice/src/admin/botloaderfuncs.php on line 77
DONE LOADING
Inserted 41126 categories into database

Mijae 01-27-2003 06:33 PM

Could anyone help me out? PM me please.

CeleronXL 01-27-2003 06:38 PM

No, don't PM him, answer here... I have the same problem. :( It'll only answer VERY few posts, all others will be smilie spam. I did the same thing as v0id for uploading too. I thought it had worked too... :(

JBMoney 01-27-2003 06:45 PM

Help? I got this reply from the bot.

Quote:

Warning: main(admin/subs.inc) [function.main]: failed to create stream: No such file or directory in /home2/www/bushwhacked/forum/alice/src/util.php on line 35



Warning: main() [function.main]: Failed opening 'admin/subs.inc' for inclusion (include_path='') in /home2/www/bushwhacked/forum/alice/src/util.php on line 35



Warning: Empty regular expression in /home2/www/bushwhacked/forum/alice/src/util.php on line 365



Warning: Empty regular expression in /home2/www/bushwhacked/forum/alice/src/util.php on line 415



Warning: Empty regular expression in /home2/www/bushwhacked/forum/alice/src/util.php on line 365

What do you do in your spare time?
:baaa:

JBMoney 01-27-2003 07:11 PM

Fixed. Appears to be working.

Erwin 01-27-2003 08:19 PM

The bot is working fine on my site - there are over 3,600 posts in his forum in under 20 hours, and he's made half of them already.

The only problem: server load - I get 200-300 concurrent users online, and this bot is sucking up my server load like crazy... it's at least doubled, and at times quadrupled! Hopefully the novelty will die down soon. :)

Radgam 01-27-2003 08:30 PM

For anyone who has been having any of these problems with the bots output:
[list=1][*]A large amount of tabs in the middle of a sentence[*]A full stop or question mark being beside more text (although there should be a space)[*]<br>s in the text[/list=1]

Do the following:

Code:

Find:
$ttb_time = time() + rand(1,5);

Code:

After that line add:
       
// Clean Output
$response = str_replace('<br>' , '', $response );
$response = str_replace('</br>' , '', $response );
$response = str_replace(', .' , '.', $response );
$response = preg_replace("/(\?|\.|!)(\w)/","$1 $2",$response);
$response = preg_replace("/(\w|,)\s+(\w|\?|\.|!)/","$1 $2",$response);
$response = preg_replace("/\n\s+/","\n",$response);

Hope this helps :) Thanks to fury for info on removing the <br>s & just to mention, the search to remove </br> was intentional as i have noticed it in the output from time to time.

Edit
I made a mistake in the original coding so please update to the above ASAP if you have used it :) Thanks to JBMoney for reporting the problem.

bandersen 01-27-2003 08:43 PM

Quote:

Originally posted by JBMoney
I get this at the end of running botloader.php. What did I do wrong?



Hi - I have just installed this hack and get the same error as you in your post 334. Did you manage to figure it out? Please share...

(I do get a first reply from the bot, but only the smiley. No second reply.)

JBMoney 01-27-2003 08:47 PM

In my case, it was a matter of chmod'ing ALL the subdirectories, not just Alice's subdirectories, but also the subdirectories of Alice's subdirectories to 777.

I tend to read directions literally, and not try to read things into them. In this case, you need to.

JBMoney 01-27-2003 09:04 PM

Every once in a while, it refers to itself as Alice. Is there a quick fix to change that to its username?

jbear6 01-27-2003 09:23 PM

You can change it's name in the "bot" table.

JBMoney 01-27-2003 09:41 PM

I think this is something different. The name is set appropriately in the Bot table.

Example of a partial reply:

"The ALICE chat robot can follow many things"

Also, it likes to cut off the first letter from words a lot, especilly after a punctuation mark of some sort ("?", ".", "!").

Mijae 01-27-2003 09:42 PM

Could anyone send me their file to admin@invoid.net?

D.aiml seems corrupt in the downloads I get. Its the only file that returns 0 categories inserted.

bandersen 01-27-2003 10:44 PM

Quote:

Originally posted by JBMoney
In my case, it was a matter of chmod'ing ALL the subdirectories, not just Alice's subdirectories, but also the subdirectories of Alice's subdirectories to 777.

I tend to read directions literally, and not try to read things into them. In this case, you need to.

Sweet!
Thank you - I managed to run botloader with no errors after chmoding EVERY directory to 777.

I am still geting the following error when posting a new thread:

Warning: fopen("http://www.athlonarena.com/forums/upload/alice/src/talk.php?input=will+you+ever+work%3F", "r") - No such file or directory in /usr251/home/banderse/public_html/forums/upload/tomstalkerbot.php on line 46

Warning: fread(): supplied argument is not a valid File-Handle resource in /usr251/home/banderse/public_html/forums/upload/tomstalkerbot.php on line 47

Warning: fclose(): supplied argument is not a valid File-Handle resource in /usr251/home/banderse/public_html/forums/upload/tomstalkerbot.php on line 48

Here is line 46-48 in tomstalkerbot.php:

$ff = fopen($ttb_alicelocation . "?input=" . urlencode($rss),"r");
$response = fread($ff,10000);
fclose($ff);


I have checked that the alicelocation is correct and tomstalkerbot.php is uploaded to my root (forums/upload). I am only able to get smiley reply's and only the first time (no second reply of any kind in the same thread).

Any hints?

fury 01-27-2003 11:58 PM

OK, WTF, now my templates table has 0 records in it (used to have 31000)

Which would probably explain why it doesn't answer... :confused:

Mijae 01-28-2003 12:51 AM

In what table are the entries stored from the .aiml files?

JBMoney 01-28-2003 03:22 AM

Radgam - It's working a lot better for me without these last two lines:

$response = preg_replace("/(\?|\.|!)(\w)/" , " $1", $response );
$response = preg_replace("/(\w)\s+(\w|\?|\.|!)/","$1 $2",$response);

They seem to be causing all the punctuation related problems I mentioned.

scsa20 01-28-2003 05:25 AM

I keep getting the following error when I post a reply or a new thread:

Quote:

Warning: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/scsa20/public_html/forums/tomstalkerbot.php on line 46

Warning: fopen("http://www.simon-soft/forums/alice/src/talk.php?input=tombot+is+kwel", "r") - Bad file descriptor in /home/scsa20/public_html/forums/tomstalkerbot.php on line 46

Warning: fread(): supplied argument is not a valid File-Handle resource in /home/scsa20/public_html/forums/tomstalkerbot.php on line 47

Warning: fclose(): supplied argument is not a valid File-Handle resource in /home/scsa20/public_html/forums/tomstalkerbot.php on line 48
how do I fix this??

Brad 01-28-2003 07:44 AM

http://www.kousetsu.net/forums/showt...0856#post30856

LOL!! ;)

bandersen 01-28-2003 07:54 AM

:p

So cool Anime-loo! I must get "mine" to work asap!

Radgam 01-28-2003 08:34 AM

Quote:

Originally posted by JBMoney
Radgam - It's working a lot better for me without these last two lines:

$response = preg_replace("/(\?|\.|!)(\w)/" , " $1", $response );
$response = preg_replace("/(\w)\s+(\w|\?|\.|!)/","$1 $2",$response);

They seem to be causing all the punctuation related problems I mentioned.

that's weird :( It's just a basic find/replace, it shouldn't be cutting off any characters... I tested it throughly on my localhost before posting as well :dead:

Could be the different OS i guess. The problem i found (just for example) is when you say "my favourite movie is lord of the rings" and you get a ton of white space.

I'll test the code a bit more and let you know what i find.

edit: oooo, i very much appologise for my mistake in the original post. I forgot to include the $2 variable which contains the word in the find/replace :eek:

Here is the updated version, please let me know if it works :nervous: (and yes, i know it's quite a few searches, but they need to be seperate to function properly :/ - but it has cleaned the output very well on my board (and is based on heavy testing!!)

Code:

Find:
$ttb_time = time() + rand(1,5);

After that line add:
       
// Clean Output
$response = str_replace('<br>' , '', $response );
$response = str_replace('</br>' , '', $response );
$response = str_replace(', .' , '.', $response );
$response = preg_replace("/(\?|\.|!)(\w)/","$1 $2",$response);
$response = preg_replace("/(\w|,)\s+(\w|\?|\.|!)/","$1 $2",$response);
$response = preg_replace("/\n\s+/","\n",$response);


Mickie D 01-28-2003 01:33 PM

yeah this hack looks very good :)

just wondering if i can only have a forum where he can answer in ???

like a forum called "ask the bot"

Radgam 01-28-2003 01:34 PM

that's how the hack currently works :) You can have the bot enabled in one selected forum.

Banana 01-28-2003 02:48 PM

OK, just did the install - all appeared OK. Read 24 pages of this thread (phew!). Everything appears fine BUT I have no entries in the "bots" table. The install says "Login to phpmyadmin and check in the 'bots' table that the bot id is 0 you find that the table 'bot's the id number in there needs editing to 0 from 1 in some cases" - so what is the row that's missing? thanks!

fury 01-28-2003 03:35 PM

Hmm, it deletes all current rows resulting from the aiml imports? That would probably explain why it only has 3000 some categories.

Radgam 01-28-2003 03:37 PM

could someone who seems to be understanding all this AIML stuff better than i am explain what i should do with this? :D

<category>
<pattern>I LIVE IN *</pattern>
<template>What is <set name="it"><set name="topic">living in <person/></set></set> like living in
<set name="location"><person/></set>?
<think><set name="it"><set name="topic"><person/></set></set></think>
</template></category>

Now, that's the cause of the AI problem on my forum where i say "I live in placename" it responds "what is living in placename like living in placename?"

Martin64 01-28-2003 03:41 PM

Quote:

Originally posted by fury
Hmm, it deletes all current rows resulting from the aiml imports? That would probably explain why it only has 3000 some categories.
Indeed it does, but if you remove the line in botloader.php I posted about above it will not delete old rows, it will only import new aiml if there is.


All times are GMT. The time now is 04:27 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01840 seconds
  • Memory Usage 1,837KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete