Docs


How to write a Mind

See Definitions for the basic terms:

A Mind is a program that takes "actions" in a World.
To write a new Mind for a World, you need to understand the state and action formats of the World. (Each World can have different state and action formats.) These formats will be explained by the World author in comments or in sample Minds.




Worlds, Minds and Scoreboards

A World that uses Minds will have a "scoreboard" showing how well the Minds have done when running in that World.



Minds may have memory

Minds may have memory. They may update a data structure on every step. In JavaScript:
 
 var i;				// or any other data structure

 AB.mind.newRun = function()
 {
  i = 1;			// or any other initialisation of the data structure
 };

 AB.mind.getAction = function ( x )		 
 { 
  i = i + 1;		// or any other update to the data structure
  return ( action );
 };