Mind definition

The "Mind" class must be defined for "Ancient Brain" APIs that use the AB framework.

It does not need to be defined for "Plain" APIs that do not use the AB framework.

The structure of the Mind class is as follows.

function Mind() 
	// The following function declarations are optional.
 	// If not declared, nothing happens and the run continues. 

	this.newRun = function()                // Things the Mind will do at the start of a run 
	this.endRun = function()                // Things the Mind will do at the end of a run

	// The following function declaration is optional.
	// If not declared, return is taken as 0.
	// State format and action format are defined by the World.

	this.getAction = function ( state )     // What action the Mind suggests to take in this state 
	  return ( action );		 		


The background is a program, showing the JavaScript graphics used on this site.

© Ancient Brain Ltd. All rights reserved.

Ancient Brain ™ is a trademark of Ancient Brain Ltd.

Beta      Contact      Stats      The name      Terms and conditions

Bug bounty      Course in Dublin      Call for partners