[ABD] Forum AI v0.2.0

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
crimeSTAR
Registered User
Posts: 4
Joined: Wed Jan 22, 2003 10:02 pm
Contact:

Post by crimeSTAR »

One other question. I've clicked "install" on the files. What is the difference between clicking "install" and clicking "submit"?
The Pelican
Registered User
Posts: 2176
Joined: Tue Jun 18, 2002 9:50 am
Location: Home is where the heart is (which happens to be in the Netherlands)
Contact:

AIML question

Post by The Pelican »

crimeSTAR wrote: What is the difference between clicking "install" and clicking "submit"?


Hitting install: Loading all AIML files into the 'brain' of Alice.
Hitting submit: Loading all AIML files which you have selected in the AIML Filelist into the 'brain' of Alice.

@ zemaj,

Maybe an idea to change the 'Submit' text in the final version into "Install selected files to brain"?
zemaj wrote: I don't know of any other extensive collection of AIML files. I believe that those 40-50 are about all your going to find anywhere. I'd be happy for someone to prove me wrong, but I've found no other files in my search - reasonable sized (i.e. more than a few entries) ones anyway.


I don't know what you call a few, but I am working on an AIML file. Don't push me or anything, this is a very low priority project. It will make Alice turn into a bartender; making the chat forum into a cafe on my forum.

About this AIML file I am building I am having a question:

Code: Select all

<category>
	<pattern>* HOT CHOCOLATE</pattern>
	<template>
		With or without whipcream?
	</template>
</category>

<category>
	<pattern>WITH *</pattern>
	<that>WITH OR WITHOUT WHIPCREAM</that>
	<template>
		Hot chocolate with whipcream comming up :)
	</template>
</category>

<category>
	<pattern>WITHOUT *</pattern>
	<that>WITH OR WITHOUT WHIPCREAM</that>
	<template>
		Plain hot chocolate comming up (y)
	</template>
</category>
I have loaded only this file into her brain. After a question on which Alice responds with "With or without whipcream?" I post "WITHOUT whipcream" and Alice has no response. Same thing for the "WITH whipcream": no response... :?
What am I doing wrong in the code? And spelling errors can't be the problem since I am copy-pasting from the file to be absolutely sure (first get the technology working, than getting the typo's out).
The Pelican :)
Knowledge Base || No PM support and no MSN or E-mail support || Asking Questions The Smart Way (and use the template)
FireFalcon
Registered User
Posts: 22
Joined: Tue Sep 24, 2002 7:06 pm
Location: Germany
Contact:

Post by FireFalcon »

Ok, forget my post above, it seems to have been my server. Once i uploaded the board, it worked without any problems. So chatbox 1.9g is fully compatible with the forum AI. Sorry, for any inconvenience this caused.
zemaj
Registered User
Posts: 267
Joined: Thu Mar 07, 2002 3:58 am
Location: Australia
Contact:

Re: AIML question

Post by zemaj »

The Pelican wrote: About this AIML file I am building I am having a question:

Code: Select all

<category>
	<pattern>* HOT CHOCOLATE</pattern>
	<template>
		With or without whipcream?
	</template>
</category>

<category>
	<pattern>WITH *</pattern>
	<that>WITH OR WITHOUT WHIPCREAM</that>
	<template>
		Hot chocolate with whipcream comming up :)
	</template>
</category>

<category>
	<pattern>WITHOUT *</pattern>
	<that>WITH OR WITHOUT WHIPCREAM</that>
	<template>
		Plain hot chocolate comming up (y)
	</template>
</category>
I have loaded only this file into her brain. After a question on which Alice responds with "With or without whipcream?" I post "WITHOUT whipcream" and Alice has no response. Same thing for the "WITH whipcream": no response... :?
What am I doing wrong in the code? And spelling errors can't be the problem since I am copy-pasting from the file to be absolutely sure (first get the technology working, than getting the typo's out).


Ahhh... ever got one of those to work? I've had problems with it.

I invented another, easier and more powerful method to do this kind of thing (I'm quite proud of it :P )

Code: Select all

<category>
<pattern>* HOT CHOCOLATE</pattern>
<template>
With or without whipcream
</template>
</category>
<category>
<pattern>_</pattern>
<that>WITH OR WITHOUT WHIPCREAM</that>
<template>
<think><set name='qar'><norm><star/></norm</set></think>
<condition>
<li name='qar' value='WITH *'>Hot chocolate with whipcream comming up :)</li>
<li name='qar' value='WITHOUT *'>Plain hot chocolate comming up (y)</li>
<li>With or without whipcream</li>
</condition>
</template>
You'll have to add:

Code: Select all

//
// QAR normalisation function
//
function ct_norm($xmlnode,$inputstar,$thatstar,$topicstar)
{
	// this is specially for normalising the sentences for QAR (Question Answer Responsse) system
	$content = recursechildren(realchild($xmlnode),$inputstar,$thatstar,$topicstar);
	$this_result = normalsentences($content);
	return strtoupper($this_result[0]);
}
To your iai_tags.php file to get the <norm> tag to work. It's not necessary, but ensures it works more often.

Try it, I think it can be a little funny with the wildcards, but it's _supposed_ to work. Also have you tried your old method without the "?". I doubt it, but it might be the problem. Finally if you do use my method, be carefull with that final <li> that has no condition. That is the default, if you set it to your orginal question then it will create a loop of asking the same question if the user does not enter a suitable response. If the response is obvious, then there should be no problem, but if it's obscure, then the loop could go on forever while the user adds input. There is no way to escape it - even if they go away and come back again since iai works from the phpbb sessions.

I hope I haven't just gone a confused you now :?

-zemaj
henry_s
Registered User
Posts: 144
Joined: Sat May 18, 2002 7:20 pm
Location: London, UK
Contact:

Post by henry_s »

I'm still having problems with it on Smartors chat box...it works fine, but I get a bunch of errors with iai_functions.php

URL: http://www.y-a-w.co.uk/sto
Henry
henry_s
Registered User
Posts: 144
Joined: Sat May 18, 2002 7:20 pm
Location: London, UK
Contact:

Post by henry_s »

anyone? :(
Henry
FireFalcon
Registered User
Posts: 22
Joined: Tue Sep 24, 2002 7:06 pm
Location: Germany
Contact:

Post by FireFalcon »

Hmm, it looks like the links are wrong.
Check the /home/sites/site148/web/sto/common.php, and see if the links are correct.
henry_s
Registered User
Posts: 144
Joined: Sat May 18, 2002 7:20 pm
Location: London, UK
Contact:

Post by henry_s »

thanks for the reply :) ,

but what links? :?
Henry
henry_s
Registered User
Posts: 144
Joined: Sat May 18, 2002 7:20 pm
Location: London, UK
Contact:

Post by henry_s »

Oh no, sorry, wrong URL :oops:

http://www.y-a-w.co.uk/sto2
Henry
FireFalcon
Registered User
Posts: 22
Joined: Tue Sep 24, 2002 7:06 pm
Location: Germany
Contact:

Post by FireFalcon »

These are the lines in the common.php that create the error:

Code: Select all

include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/template.'.$phpEx);
include($phpbb_root_path . 'includes/sessions.'.$phpEx);
include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);
These link to files in your "Includes" folder.
The common.php should be in your phpBB root directory, which from what i understand is "/home/sites/site148/web/sto/" in your case. So the files that are mentioned above should be located at "/home/sites/site148/web/sto/includes/".
Check if this is the case. if it isn't, adjust the links as necessary.

Hope that helps, i'm not entirely sure on that.
carebear
Registered User
Posts: 4
Joined: Tue Jan 14, 2003 7:22 pm

Is there any way to have the AI bot delay posting?

Post by carebear »

I know the mod basically takes a post and responds and enters both posts at pretty much the same time, but is there a way to delay the posting so it is more realistically like another user? Maybe 30 seconds, 2 minutes, etc...
LifeIsPain
Former Team Member
Posts: 2148
Joined: Tue Oct 01, 2002 7:04 am
Location: Way Way Behind

Post by LifeIsPain »

You can't put a delay on a PHP script, not with the use of standard server software at least. The reply is pretty much going to have to happen at somepoint that is triggered by an event, and that makes it a bit harder.
LifeIsPain - one who needs to be smackedLife is pain, highness! Anyone who says differently is selling something.
User avatar
Mav
Former Team Member
Posts: 2261
Joined: Wed May 15, 2002 9:19 am
Location: England
Contact:

Re: Is there any way to have the AI bot delay posting?

Post by Mav »

carebear wrote: I know the mod basically takes a post and responds and enters both posts at pretty much the same time, but is there a way to delay the posting so it is more realistically like another user? Maybe 30 seconds, 2 minutes, etc...


if you look back thru the thread you'll find the code changes to do this.
CMD
Registered User
Posts: 12
Joined: Thu Jan 30, 2003 6:54 pm

Post by CMD »

eh dudes i need some aiml files but the link off the site that is posted earlyer in this topic doesnt work were do i get them
entelligence
Registered User
Posts: 86
Joined: Tue Nov 19, 2002 11:53 pm

Post by entelligence »

CAN SOMEONE PLEASE HELP ME OUT? I downloaded the mod and installed it but then I got to the part where I need to install the Alice files, but they aren't posted on his site anymore. Does anyone know where I can download them from?
Locked

Return to “[2.0.x] MODs in Development”