hi

I want to write cellular automata lee algorithm (I call it wave method) which searches for the shortest path between 2 points.In lee algorithm the user specifies the weight one for all grid points and the algorithm will find thepath with the lowest number of grid points(it means the accumulated weights are needed to find the path).But this method which I want to write , instead of storing accumulated weights , stores the direction in which we have to move to get back to the starting point.( it means we use marks instead of weights)

In this method we have 15 state that a number will be assign for each state,& also it has two phase : at the begining all cells are in the free state except start and end points.In the first phase all neighbour cells of start point became wave ( which are arrow in 4th direction ( north -south-west east)to start)and after that all cells check whether there is any cell in neiborhood that already has a wave mark, if found the cell becomes wave mark towards the already wave cell.this step ends when the end point is reached Now the second step begins and the path is built backward towards the start point along the wave marks (if a cell is one of the wave states &it sees a neighbour cell that is a path towards this cell then this cell becomes a path I the direction of it,s previous mark(f.example wave up become path up)

The algorithm terminates when the start cell sees one of it's neighbours become part of the path .the start celll changes it's state to found and signals that the path is complete.

15states are defined: block, free (Initial State of the Nodes), initD (Initial State of the Destination Node), 4state for wavemarkwhich are ( wave up,Wave Down, Wave Right & Wave Left),and etc.....

I assign a number to each states and each cell according to it's current state and it's neighbours which are north- south-east-west), change it's state .

Now my problem is that I don't know how to begin & write it and have no idea( I just know that I have a matrix for grid point), Can someone help me out with this, please? Please help me write this algorithm I'm not professional

Tnx all

0