All pastes #194810 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-10-08 09:09 UTC
rendered paste body
* Proof of concept for an AI learning how to navigate a maze

Thanksgiving weekend goal:
    * Empty field
    * Bot has to respect the edges


* OOP
* Hash based objects


Objects:

MazeSim::Graphics->new: Creates a new graphics object
MazeSim::Graphics->refresh: Refreshes the display


MazeSim::Bot->new: Creates a new bot
MazeSim::Bot->do_one_turn: Useing the data provided to it bot returns a direction to move


MazeSim::Maze->new: Initialiazes a maze
MazeSim::Maze->generate: Generates a maze
MazeSim::Maze->at_coord: Returns what is at a certain coordinate (wall or space)