So, i'm trying to do a turtle what can find different objectives in a maze, and send what it already did on a screen.
Rule for mazes:
- paths are 1 wide
- maze is unknown, only the type (to end, to obj, to obj then end)
- If there's a start and an end known, taking the estimated shortest way (discovering wall step by step)
- If there's a start and objective to find (8 RS block on floor in square), going randomly if gone on a wrong way, taking the nearest undiscovered path. trying to find where the square can be. Return to start by path finding.
How will i do that ... well:
- taking the estimated shortest way to the objective (as position unknown, going randomly and looking to a logical patern of where it can be)
- doing sends each step to a computer (count how many time it scans, moves etc ...)
- will fill and print what it made on the turtle and monitor, turtle centered
And ... i looked some site about tables, but didn't understand a bit ...
Think something like:
maze = {{ wall, wall, path},
{ wall, wall, path},
{ wall, wall, path}}
But i clearly i've no idea to how i can create it =/ (and so insert values in), if someone can help a bit? =)
________________________________________________________________________
EDIT:
hum ... think i just found (funny how i can be stuck on a thing ... and when i post to ask help i find something).
so:
table = {}
if type(table[x]) ~= "table" then table[x] = {} end
"x" will be the line what the turtle is testing.
am i right?
Edited by Neekow, 20 February 2017 - 02:15 AM.












