Ok as the title says i want to create a very basic ai. It should find its way in a 2D map. The map is stored in a textfile like this
111111111
1A0000001
100110101
100110101
1000000B1
111111111
1 represents a wall and 0 is walkable space...and i want my bot to find the fastest way from point a to b. It would be nice if you could push me in a good direction.
Very basic AI
Started by Arterie, Jul 20 2009 11:00 AM
3 replies to this topic
#1
Posted 20 July 2009 - 11:00 AM
|
|
|
#2
Posted 20 July 2009 - 11:09 AM
Posted via CodeCall Mobile i really have no idea, but im pretty sure you should have some way to make your bot aware of whats around him.
#3
Posted 20 July 2009 - 11:37 AM
We've got a solution to this exact problem on this forum from about 6 months ago... My recommendation was that you start at a and label it's distance 0. Then go to each adjacent 0 and mark their distance as 1. Then each adjacent to those as 2, then 3, then ...
When you hit B, you know the distance.
When you hit B, you know the distance.
#4
Posted 21 July 2009 - 09:18 AM
Ok thanks i searched for the wrong term. i found the thread. ill read it and maybe post some questions if i still have some. Thanks for your help!


Sign In
Create Account

Back to top









