[Pogamut-list] POSH best practices
JJBryson
pogamut-forum at artemis.ms.mff.cuni.cz
Sun Oct 25 17:05:25 CET 2009
Re: POSH best practices
Author: JJBryson
> 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
Hi -- this is deliberate. The idea is / was that most such values should not be parameters to POSH plans, but rather variables stored in modules which are a part of the agent's memory. This way they can be adjusted depending on the agent's state.
>
> 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
NOT is present (at least in my implementation) though not directly -- you can say close_enemy = false for example. AND is the implicit conjunction whenever you have multiple preconditions. OR has to be handled by having more than one condition in a BRP, but this isn't *too* much of a pain given that you only need to reference the same post-condition / action element.
In general, I have found agents to be most easy to build & maintain if you do *not* make complicated POSH plans. POSH is not really a scripting language for encoding all of the agent's behaviour. The majority of the agent's behaviour is encoded in the behaviour modules (objects). POSH plans should be simple descriptors of priorities which help you keep the behaviour modules also clean and simple, by making sure only the right ones are active in the right context.
At least, that is my experience having developed a bunch of different kinds of agents with BOD. If you want to make a more language-like scripting system that extends POSH more towards a full language, you are entitled to do that! But BOD was intended as a way to capture the power of the modular, behaviour-based approach to building cognitive systems. POSH is just one part of that. AIGameDev did a pretty good job of describing this.
http://aigamedev.com/open/reviews/behavior-oriented-design-modular-agent/
Joanna
More information about the Pogamut-list
mailing list