suakow / maze-solver

Automatically exported from code.google.com/p/maze-solver
0 stars 0 forks source link

Robot AI Interface #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Something that's required for the maze controller and animation system and to 
allow others to implement there own AI algorithms as well as the built in 
scripting system.

Here's what's up there so far.
http://code.google.com/p/maze-
solver/source/browse/trunk/src/maze/ai/RobotInterface.java
http://code.google.com/p/maze-
solver/source/browse/trunk/src/maze/ai/RobotStep.java

It may need a method to pass the model to the AI bot.
I'm not sure what else it might need.

Original issue reported on code.google.com by lukelast@gmail.com on 29 Apr 2009 at 10:21

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I had just been implementing the algorithms inside of the robot and using a 
switch to
go between.  It would take a little doing to separate them, but if it's 
necessary
then I'll do it.  It does seem that it'd be easier that way if we implement the
scripting.

I'd suggest the robot model holding the algorithms instead of the algorithms 
holding
the robot model because the view is displaying the robot and the robot is 
affected by
the algorithm.

Is there a particular reason why you're making all of these model interfaces and
making the model classes inherit from them?

Original comment by frey...@gmail.com on 30 Apr 2009 at 7:16

Attachments:

GoogleCodeExporter commented 9 years ago
I can't think if any reasons at the moment that would make it necessary to 
split up 
the algorithms.

Holding the AI algorithm (a controller) inside the model I think would go 
against the 
MVC rules.

The model interface allows the actual model implementation to be changed 
without the 
views being none the wiser. Which of course I did when I switched from using 
the stub 
model to your model withing changing any code in the view.

Also the model and AI interactions need to be simple enough to work from the 
scripting panel. Which I have working with Python now, it's pretty neat.

Original comment by lukelast@gmail.com on 30 Apr 2009 at 8:14

GoogleCodeExporter commented 9 years ago

Original comment by lukelast@gmail.com on 9 Jun 2009 at 11:49