[Pogamut-list] POSH best practices

jcothran pogamut-forum at artemis.ms.mff.cuni.cz
Mon Oct 12 05:52:14 CEST 2009


POSH best practices

Author: jcothran

In working with POSH and .lap files, there are a few limitations that I'm trying to work around:

1) function calls have no parameters

for example, if I wanted to call a sleep function of 200 milliseconds I end up hardcoding the parameter value into the function name sleep_ms_200,sleep_short,etc

2) function operators such as NOT and OR are missing

for example, close_enemy has opposite not_close_enemy which is just a wrapper function for !close_enemy

In regards to OR, I don't need it at this time as the assumed AND between trigger evaluations is sufficient(for now)

Basically just wondering if hardcoding the parameter types and values and 'not_' into the function call names is ok, or a better recommendation.  The POSH reminds me very much of HTN(Hierarchical Task Network), but some of the scripts for other HTN's allow slightly more complexity in the parenthetical expressions.

Also trying to 'super' the receiveMessage function to intercept certain gamebot message, I believe I need to do insert this in the sposhbot class library which contains Client.Agent

Thanks
Jeremy





More information about the Pogamut-list mailing list