AI: Worldsim 2 Notes

Nov 22, 2009 16:36

In between MATH and MATH and MATH and other problems, I've been messing around with a tiny simulated world for AI testing, called "Morningside". I wrote a series of challenges for myself and anyone else who cares. The final exam involves surviving for 1000 turns in that little board-game world, by gathering food, and answering a set of questions ( Read more... )

ai

Leave a comment

Comments 5

starglider November 23 2009, 04:08:19 UTC
I would recommend plenty of concave elements in the environment, such that you have to use actual pathfinding (e.g. A*) rather than a simple 'move towards object and slide around obstacles' (which will work as long as all shapes are convex).

Reply

kris_schnee November 23 2009, 04:54:27 UTC
Good idea, and another reason to have "indoor" areas. A* pathfinding isn't that hard to do, but is an important part of basic AI. A wrinkle in that, though, is that I'd like to have the AIs not get full vision around walls, which makes the "pure" form of A* unusable because it relies on perfect knowledge. I've never written an occlusion function though.

Reply

starglider November 24 2009, 05:16:16 UTC
Occlusion on a 2D map is fairly easy if performance isn't critical; take the standard line drawing loop from any 2D graphics primer, replace 'set pixel' with 'mark square as visible' and 'check for obstruction', and draw a visibility line from the character to every tile on the map borders, terminating if you hit an obstruction. If you really don't care about performance, you can check line-of-sight from every tile to the character independently. If you /do/ care about performance, I would recommend a bitfield based propagation algorithm. ;) Efficient implementations of A* get interesting too, but for a few characters on small maps without deep brute-force-planning, simple recursion should be fine.

Reply

Cross compatable starglider February 27 2010, 02:24:30 UTC
Id be happy for a new version
just make it so the current versions ai will work in the next on and maby include a few levels that dont need 3d to solve
I think that map size should be decided by the level used
and the base image shrunk to fit

Reply


Challenge Idea anonymous March 4 2010, 04:22:27 UTC
Pattern matching:
create one Ai that walks in a circle
your ai must find the pattern after 50 turns when the "Dumb" ai will say what will my next move be?
this could be an advanced test to see mamory and patternmatching

Reply


Leave a comment

Up