From: Ben <lgp...@16...> - 2008-04-10 19:18:52
|
Hi, Markus: >thanks Ben for your work. I looked at the source code and it's getting >better ;-) It's a pleasure :) 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? 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. 3. > So declaring all required symbols as DLL-Export is quite a lot of work. define macro SHARED_LIB_COMPILE, and add CLASS_EXPORT in each function can make it work, right? This is really lots of work. 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 :( Thanks! Best wishes! Ben [1] www.apollo3d.cn/download/sparkgame.tar.gz |