Out Of It rules

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
Hektor
Posts: 89
Joined: November 3rd, 2011, 2:37 pm

Out Of It rules

Post by Hektor » May 31st, 2012, 7:25 am

I wrote a script to emulate the Out Of It rulespace on golly.
Basically it's the iteration of the three rules 1 out of 8, 2 out of 8 and 3 out of 8 (1/012345678, 2/012345678, 3/012345678) in different ways.

For example 3 * 1/012345678, 0 * 2/012345678, 1 * 3/012345678 (Out Of It 301) will apply 1/012345678 for three generations, will skip 2/012345678 then it will apply 3/012345678 once and repeat for x generations.

Code: Select all

import golly as g

s = g.getstring("Out Of It rulespace\nExample 110,100:\nuse one time B1/S012345678\nthen one time B2/S012345678\nthen 0 times B3/S012345678 and repeat for 100 (at least...) generations","110,100")

mainloop = int(s[4:])

one = int(s[0])
two = int(s[1])
three = int(s[2])

g.autoupdate(True)
for i in xrange(0,mainloop/2):
	for a in xrange(0,one):
		g.setrule("B1/S012345678")
		g.step()
	for b in xrange(0,two):
		g.setrule("B2/S012345678")
		g.step()
	for c in xrange(0,three):
		g.setrule("B3/S012345678")
		g.step()

g.exit(str(mainloop))
Out Of It on collidoscope: http://www.collidoscope.com/modernca/outofitrules.html

Post Reply