http://en.wikipedia.org/wiki/A-star_search_algorithm

That’s one of the best search algorithms when implimented well (ie with an accurate heuristic)

Please log in or register to post a reply.

http://en.wikipedia.org/wiki/A-star_search_algorithm

That’s one of the best search algorithms when implimented well (ie with an accurate heuristic)

Can you lookup anymore of the map around you? If you can, just use A* search

If you can’t change the design, then run through every position on the map and see if it matches the 9 tiles you know around.

- Upcoming Multiplatform Game Program...
- Our first game - looking for feedbacks
- Network Emulation Tool
- Trouble with accessing GLSL array
- Fiction
- Game Programming Patterns: Bytecode
- Interactive WebGL Water Demo
- Skeletal Animation Tutorial with GP...
- Unreal Engine 4
- Microsoft xbox one selling poorly

Exuse me for my bad english, please.

The solution of following problem is very important for me:

I have a square map with size N x M (4<N<129, 4<M<129) and it’s

divided into N X M squares. Each of this squares have value (0, 1, 2, or 3):

0 - this squares are impassable (something like wall).

1, 2, 3 - the cost of passable squares.

I also have a goal point on this map with coordinates (x,y) and I must go to it.

I don’t know where I am on the map, but I can view an eight squares around me.

I’m able to move in four directions (up, down, left, right). If you can help me

with an algorithm, which finding shortest(costless) path to goal, I’ll be much thankful.

I don’t know my start position and it’s the huge problem for me.

Thank you!

This is one examle of map with size 10 x 12:

1. Map:

0 0 0 0 0 0 0 0 0 0

0 1 1 1 1 1 1 1 1 0

0 1 1 1 1 1 1 1 1 0

0 1 1 2 1 1 2 1 1 0

0 1 1 0 1 1 0 1 1 0

0 1 1 1 1 1 1 1 1 0

0 1 1 1 1 1 1 1 1 0

0 1 1 2 1 1 2 1 1 0

0 1 1 0 1 1 0 1 1 0

0 1 1 1 1 1 1 1 1 0

0 1 1 1 1 1 1 1 1 0

0 0 0 0 0 0 0 0 0 0

1 1 1

1 1 1

1 2 1