Rainbow Automata

Rainbow Automata Example

Simply extending on our previous rock, paper, scissors Cellular Automata example, this version extends the cellTypes array to contain seven types, one for each rainbow colour:

Rainbow Cellular Automata example

var cellTypes = {
	"red"		: { "colour" : "#cc0000", "prey" : "orange" },
	"orange"	: { "colour" : "#cc9900", "prey" : "yellow" },
	"yellow"	: { "colour" : "#cccc00", "prey" : "green" },
	"green"		: { "colour" : "#00cc00", "prey" : "blue" },
	"blue"		: { "colour" : "#0000cc", "prey" : "indigo" },
	"indigo"	: { "colour" : "#9900cc", "prey" : "violet" },
	"violet"	: { "colour" : "#cc00cc", "prey" : "red" }
};

Unlike rock, paper, scissors, even with directional biasing enabled, this system does not tend to reach any repetitive state. Sooner or later, one colour will dominate, resulting in activity in the map being killed off.

Rainbow automata

This demonstrates the problems with overly simplified systems in these examples.

Page loaded in 0.012 second(s).