From: Markus R. <rol...@un...> - 2008-04-11 17:35:34
|
Hi, Ben schrieb: > 1. >I have some comments: > >- I wonder if it's better to give the prdicate list directly to the > >think method of the behavior class. In the current implementation the > >predicates are collected[...] > >The TrainControl::EndCycle() method get's the senselist from the > >agentaspect. This could be passed on to the behavior class directly. > This can reduce the time of 'parse', and I think 'GameControlServer' > should overload 'Parse()' to accept 'predicatelist'. > but when the behavior want to print the message received, is predicate > better? I think using predicates list in both directions (for senses and actions) is better for performance. As it completely avoids the parsing overhead. Overloading the GameControlServer Parse() to accept a predicate list is a good idea. You are right that the internal agent might want to print the received senses. For this case we could provide a method in the base Behavior class that looks up the parser in the GameControl server and generates the string on demand for debug purposes. For the main game loop however I'd prefer the predicate lists. This method could be refactored from TrainControl::EndCycle to lookup the parser and call generate with a given senselist parameter. > 2. >- You are using cerrs and stdouts to give agent responses instead of > the > >Logserver (i.e. GetLog()->Normal() << "msg"). Maybe we should introduce > >a new log channel for agent responses? > I copy it from 'agentspark'. A new log channel is appreciated. The most simple solution would be a single logchannel for all integrated agents. A more elaborate solution would provide a channel for each agent. Opinions? [...] > Lastly, I've make a update here[1], and I add a 'SphereBehavior' which > can be controlled by 'GameInput'. There is an issue: the keys should be > pressed as soon as the simulation started, otherwise the agent can not > be controlled, I don't know why :( sorry, I didn't test this game. But I looked over the last version of the integrated agent patch and I'd say that it's ready for inclusion into CVS! ;) The change concerning the use of predicate lists would be nice however ;) cheers, Markus |