[alicebot-developer] ProgramD - predicate cache saving
Albertas Mickenas
alicebot-developer@list.alicebot.org
Thu, 14 Apr 2005 21:15:29 +0300
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
i think i've found a bug in ProgramD predicate handling code. Who is
maintaining ProgramD right now BTW?
i was writting a Use Case framework for AIML, and i've run into some
oddities after the test is run for reasonable count of times.
Then i wrote a simple test which was working like this:
- - send to bot 'CLEAR VARS' (CLEAR VARS is a special category that resets
all used predicates to an empty string)
- - send to bot 'HELLO'
- - repeat 100 times
i've noticed that bot replies start to return different replies to HELLO
after some times. That means that CLEAR VARS just stops working ie
predicates are not reset to empty string.
Then i've noticed, that it depends on 'programd.predicate-cache.max'
property in server.properties - when i make it less, the anomaly occurs
earlier.
then i've found this code in PredicateMaster class 'save' method:
// Do not save default values.
if (!value.equals(bestAvailableDefault(name, botid)))
{
ActiveMultiplexor.getInstance().savePredicate(
name, value, userid, botid);
saveCount++;
}
so, after predicate cache is full and ProgramD tries to save the
predicate, it no longer is set to empty string (the default value for
predicate)
after i've removed default value checking from PredicateMaster.save()
(ie predicates with default value are saved to database) the tests
became OK.
so, one thing - i'd like to discuss this issue with someone who knows
internals of ProgramD, anoter thing, i'd like to contribute our AIML use
case framework to codebase - how do i do it? :)
cheers,
mic.
- --
albertas.
- ---------------
sistemu analitikas
UAB MegaLogika, www.megalogika.lt, tel. +37052611428
man patinka aktyvi protoplazma,
bet man patinka ir pasyvi protoplazma
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCXrNBJ2lgtwRRHqERAiemAKCmr7B2oitoLuaXXcBknfTtjAHPqwCfaEqq
jas3YyNr82ZGBYLomuxgDcs=
=qCrd
-----END PGP SIGNATURE-----