Code from a coding session 27. nov, playing with Clojure after reading the Clojure chapter in the 7 Languages in 7 Weeks book.
The idea is to build a simple simulation for a genetic algorithm. The task is to generate the best program to solve the task of eating as much food as possible in a maze, without stepping on a mine.
We didn't get too far on the task, as none of us had much Clojure experience. Currently we have two instructions, walk
and turn
. The instructions can be added in a list, and then executed on the world. The idea is to add more instructions, such as look/if
and jump/goto
, and then generate multiple programs to run in a simulation, and then mutate towards finding the program capable of eating the most food.
Putting the code up here in case we plan to continue on the project some other time.