Rule:Langtons-Ant-Count

From LifeWiki
Revision as of 16:05, 20 January 2020 by Ian07 (talk | contribs) (from https://github.com/gollygang/ruletablerepository)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

@RULE Langtons-Ant-Count

@TABLE

  1. Emulation of Langton's Ant using a von Neumann CA
  2. extra states are used to code the ant's current direction:
  3. -----------------------------empty squares---------------------
  4. 0 : black
  5. 1 : white
  6. ----------------------------------------------ant is here------
  7. 2 : ant is facing east on a black square
  8. 3 : north, black
  9. 4 : west, black
  10. 5 : south, black
  11. 6 : east, white
  12. 7 : north, white
  13. 8 : west, white
  14. 9 : south, white
  15. ---------------------------------------------------------------

n_states:10 neighborhood:vonNeumann symmetries:none

var a={2,3,4,5} var b={6,7,8,9} var c={0,1} var d={0,1} var e={0,1} var f={0,1} var g={5,9} var h={4,8} var i={3,7} var j={2,6}

  1. the ant leaves:

a,c,d,e,f,0 # leaving a black square b,c,d,e,f,1 # leaving a white square

  1. the ant arrives:

1,g,c,d,e,5 # ant arrives on a white square from the north, now on a black square facing west 0,g,c,d,e,6 # ant arrives on a black square from the north, now on a white square facing east 1,c,h,d,e,4 # ant arrives on a white square from the east, now on a black square facing north 0,c,h,d,e,9 # ant arrives on a black square from the east, now on a white square facing south 1,c,d,i,e,3 # ant arrives on a white square from the south, now on a black square facing east 0,c,d,i,e,8 # ant arrives on a black square from the south, now on a white square facing west 1,c,d,e,j,2 # ant arrives on a white square from the west, now on a black square facing south 0,c,d,e,j,7 # ant arrives on a black square from the west, now on a white square facing north