Self Avoiding Walk
This is a variation in a random walk simulation.
Default starting location is in a corner. Press space to run simulation from random spot.
Here, the computer randomly moves North, West, East or South as long as it doesn't go outside the box or return to any previously visited spot.
Update: Reworked code to fix bug in turbo mode. Also reset record!
This is really just like a random game of "Snake", but has applications in things like chain polymers and solvents.
Check out my other project on random walks!