Skip to main content
Trim image.
Source Link
user40980
user40980

I have a rectangular grid of square tiles, some of which are blocked/filled. I start at a random tile inside the grid with the blocked tiles, randomly placed. I can turn in 90° steps and check whether I can enter the tile in front of me, which is possible if the tile in front of me is not a blocked tile or the edge of the grid. I cannot distinguish both cases from each other, I also have no coordinates and don't "know" my position in the grid.

I now need an algorithm to run through all open tiles of the grid. Using maze-solving algorithms (e.g. Pledge) makes me run along the walls of blocked tiles and the grid's borders, however it is possible that there are free tiles that are not adjacent to a wall, which do not get hit with these algorithms.

What kind of algorithm or logic do I need to use to make sure I cover all empty tiles?

Sample image:

http://i.imgur.com/D666Dv3.pngenter image description here

I have a rectangular grid of square tiles, some of which are blocked/filled. I start at a random tile inside the grid with the blocked tiles, randomly placed. I can turn in 90° steps and check whether I can enter the tile in front of me, which is possible if the tile in front of me is not a blocked tile or the edge of the grid. I cannot distinguish both cases from each other, I also have no coordinates and don't "know" my position in the grid.

I now need an algorithm to run through all open tiles of the grid. Using maze-solving algorithms (e.g. Pledge) makes me run along the walls of blocked tiles and the grid's borders, however it is possible that there are free tiles that are not adjacent to a wall, which do not get hit with these algorithms.

What kind of algorithm or logic do I need to use to make sure I cover all empty tiles?

Sample image:

http://i.imgur.com/D666Dv3.png

I have a rectangular grid of square tiles, some of which are blocked/filled. I start at a random tile inside the grid with the blocked tiles, randomly placed. I can turn in 90° steps and check whether I can enter the tile in front of me, which is possible if the tile in front of me is not a blocked tile or the edge of the grid. I cannot distinguish both cases from each other, I also have no coordinates and don't "know" my position in the grid.

I now need an algorithm to run through all open tiles of the grid. Using maze-solving algorithms (e.g. Pledge) makes me run along the walls of blocked tiles and the grid's borders, however it is possible that there are free tiles that are not adjacent to a wall, which do not get hit with these algorithms.

What kind of algorithm or logic do I need to use to make sure I cover all empty tiles?

Sample image:

enter image description here

http://i.imgur.com/D666Dv3.png -> https://i.sstatic.net/CnLYi.png
Source Link
gnat
  • 20.5k
  • 29
  • 117
  • 310

I have a rectangular grid of square tiles, some of which are blocked/filled. I start at a random tile inside the grid with the blocked tiles, randomly placed. I can turn in 90° steps and check whether I can enter the tile in front of me, which is possible if the tile in front of me is not a blocked tile or the edge of the grid. I cannot distinguish both cases from each other, I also have no coordinates and don't "know" my position in the grid.

I now need an algorithm to run through all open tiles of the grid. Using maze-solving algorithms (e.g. Pledge) makes me run along the walls of blocked tiles and the grid's borders, however it is possible that there are free tiles that are not adjacent to a wall, which do not get hit with these algorithms.

What kind of algorithm or logic do I need to use to make sure I cover all empty tiles?

Sample image: http://i.imgur.com/D666Dv3.png

http://i.imgur.com/D666Dv3.png

I have a rectangular grid of square tiles, some of which are blocked/filled. I start at a random tile inside the grid with the blocked tiles, randomly placed. I can turn in 90° steps and check whether I can enter the tile in front of me, which is possible if the tile in front of me is not a blocked tile or the edge of the grid. I cannot distinguish both cases from each other, I also have no coordinates and don't "know" my position in the grid.

I now need an algorithm to run through all open tiles of the grid. Using maze-solving algorithms (e.g. Pledge) makes me run along the walls of blocked tiles and the grid's borders, however it is possible that there are free tiles that are not adjacent to a wall, which do not get hit with these algorithms.

What kind of algorithm or logic do I need to use to make sure I cover all empty tiles?

Sample image: http://i.imgur.com/D666Dv3.png

I have a rectangular grid of square tiles, some of which are blocked/filled. I start at a random tile inside the grid with the blocked tiles, randomly placed. I can turn in 90° steps and check whether I can enter the tile in front of me, which is possible if the tile in front of me is not a blocked tile or the edge of the grid. I cannot distinguish both cases from each other, I also have no coordinates and don't "know" my position in the grid.

I now need an algorithm to run through all open tiles of the grid. Using maze-solving algorithms (e.g. Pledge) makes me run along the walls of blocked tiles and the grid's borders, however it is possible that there are free tiles that are not adjacent to a wall, which do not get hit with these algorithms.

What kind of algorithm or logic do I need to use to make sure I cover all empty tiles?

Sample image:

http://i.imgur.com/D666Dv3.png

added 48 characters in body
Source Link

I have a rectangular grid of square tiles, some of which are blocked/filled. I start at a random tile inside the grid with the blocked tiles, randomly placed. I can turn in 90° steps and check whether I can enter the tile in front of me, which is possible if the tile in front of me is not a blocked tile or the edge of the grid. I cannot distinguish both cases from each other, I also have no coordinates and don't "know" my position in the grid.

I now need an algorithm to run through all open tiles of the grid. Using maze-solving algorithms (e.g. Pledge) makes me run along the walls of blocked tiles and the grid's borders, however it is possible that there are free tiles that are not adjacent to a wall, which do not get hit with these algorithms.

What kind of algorithm or logic do I need to use to make sure I cover all empty tiles?

Sample image: http://i.imgur.com/D666Dv3.png

I have a rectangular grid of square tiles, some of which are blocked/filled. I start at a random tile inside the grid with the blocked tiles, randomly placed. I can turn in 90° steps and check whether I can enter the tile in front of me, which is possible if the tile in front of me is not a blocked tile or the edge of the grid. I cannot distinguish both cases from each other, I also have no coordinates and don't "know" my position in the grid.

I now need an algorithm to run through all open tiles of the grid. Using maze-solving algorithms (e.g. Pledge) makes me run along the walls of blocked tiles and the grid's borders, however it is possible that there are free tiles that are not adjacent to a wall, which do not get hit with these algorithms.

What kind of algorithm or logic do I need to use to make sure I cover all empty tiles?

I have a rectangular grid of square tiles, some of which are blocked/filled. I start at a random tile inside the grid with the blocked tiles, randomly placed. I can turn in 90° steps and check whether I can enter the tile in front of me, which is possible if the tile in front of me is not a blocked tile or the edge of the grid. I cannot distinguish both cases from each other, I also have no coordinates and don't "know" my position in the grid.

I now need an algorithm to run through all open tiles of the grid. Using maze-solving algorithms (e.g. Pledge) makes me run along the walls of blocked tiles and the grid's borders, however it is possible that there are free tiles that are not adjacent to a wall, which do not get hit with these algorithms.

What kind of algorithm or logic do I need to use to make sure I cover all empty tiles?

Sample image: http://i.imgur.com/D666Dv3.png

minor modifications to try and clarify the problem
Source Link
Rachel
  • 24k
  • 16
  • 95
  • 160
Loading
http://meta.stackexchange.com/questions/2950/should-hi-thanks-taglines-and-salutations-be-removed-from-posts
Source Link
gnat
  • 20.5k
  • 29
  • 117
  • 310
Loading
Source Link
Loading