Quote:
it is about designing a game about havig actors (2peoples for example ) try to get out from a floor in danger (fire for example), getting out by uing path optimisation
'Path optimization' or 'Shortest path' is usually liked to TSP and problems alike.
Travelling salesman problem - Wikipedia[
^]
I think your problem is different.
Your description is very vague, but lets set an example.
You have a building (a 1 floor grid), with walls and 1 or more exits.
Establish rules of moving.
you want to know best path to reach an exit.
Take a piece of paper and draw the building/room with walls and exits.
Rate each exit with value 0, from each 0 rate 1 each cell unrated within reach of the zeros, repeat with rating 2 each unrated cell within reach of cells rated 1 and so on until there is not more unrated cells.
Now, from anywhere in building, the best path to exit is through the cell within reach with smallest rate (it is distance to exit).
Note: fire zones are handled like walls.
Then translate to program.