AI navigation around a 2d map - Avoiding obstacles.

Posted by Curt Walker on Stack Overflow See other posts from Stack Overflow or by Curt Walker
Published on 2010-05-01T23:21:31Z Indexed on 2010/05/01 23:27 UTC
Read the original article Hit count: 292

Hey there,

I know my question seems pretty vague but I can't think of a better way to put it so I'll start off by explaining what I'm trying to do.

I'm currently working on a project whereby I've been given a map and I'm coding a 'Critter' that should be able to navigate it's way around the map, the critter has various other functions but are not relevant to the current question. The whole program and solution is being written in C#.

I can control the speed of the critter, and retrieve it's current location on the map by returning it's current X and Y position, I can also set it's direction when it collides with the terrain that blocks it.

The only problem I have is that I can't think of a way to intelligently navigate my way around the map, so far I've been basing it around what direction the critter is facing when it collides with the terrain, and this is in no way a good way of moving around the map!

I'm not a games programmer, and this is for a software assignment, so I have no clue on AI techniques.

All I am after is a push in the right direction on how I could go about getting this critter to find it's way around any map given to me.

Here's an image of the map and critters to give you an idea of what i'm talking about.

Here's a link to an image of what the maps and critters look like. Map and Critter image

I'm in no way looking for anyone to give me a full solution, just a push in the general direction on map navigation.

Thanks in advance!

© Stack Overflow or respective owner

Related posts about artificial-intelligence

Related posts about c#