hunter.txt 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. Concurrent Maze Space Transformation
  2. (with Authentic Interrodent Communication)
  3. In The HUNTER Programming Language
  4. It is perceived that one of the biggest problems in maintaining
  5. interest in programming is the above linear growth of boredom
  6. compared to the usefulness of the program, resulting in an
  7. acute loss of enthusiasm on the part of the programmers and
  8. ultimately the abandonment of the software.
  9. This document intends to address that by introducing a language
  10. with new models for sharing, flow control, and data manipulation,
  11. which make all dependencies in a program globally accessible and
  12. radically oblique at the language level.
  13. We introduce the language, which is a deterministic particle
  14. automaton based on mazespace-rewriting and critter-style message
  15. passing and, being ASCII art, is inherently graphical in notation...
  16. The HUNTER Programming Language
  17. (c)2000-2002 Cat's Eye Technologies. All rights reserved.
  18. Each HUNTER program consists of a two-dimensional Cartesian-grid
  19. playfield of any reasonable arbitrary size. Each square in this
  20. grid is called a cell. Each cell may contain one of several
  21. things, or be considered 'empty'. It may also contain a mouse,
  22. which is a particularly special kind of thing. However, a mouse
  23. must start in an otherwise empty square.
  24. Mice are particularly special because they have agency. Unlike
  25. walls and pieces of cheese, they do things. Primarily, they move
  26. around. They do so at runtime.
  27. The deterministic fashion a mouse moves around - always checking
  28. east, then north, then west, then south, in each cell - and its
  29. memory (each mouse keeps a 'map' of where it's been in it's head
  30. and tries not to backtrack unless there is nowhere else new to
  31. go) ensures that, given some time, and all other things being
  32. equal, a mouse will traverse it's entire environment and will
  33. return to where it started. The process then repeats, holding
  34. the mouse in a state of perpetual live lock.
  35. However, not all other things may be equal. Indeed, the mouse
  36. may nibble on a bit of strychnine and die. Or, other mice may
  37. be concurrently tranversing the same maze, and two mice may not
  38. share the same space, so they may block each other's progress.
  39. Mice may not move through walls but they may move through empty
  40. space and on top of items found in the playfield, possibly
  41. altering them (see below.)
  42. Execution ends when all mice are dead.
  43. An example HUNTER program might be:
  44. ########
  45. # 1#2#
  46. # #### #
  47. # #
  48. # ######
  49. # m#
  50. #+######
  51. # !#
  52. ########
  53. where
  54. # indicates a wall
  55. m indicates a mouse
  56. the digits 0 to 9 represent types of cheese
  57. 0 = cheddar
  58. 1 = american
  59. 2 = swiss
  60. 3 = gouda
  61. 4 = mozzarella
  62. 5 = farmer
  63. 6 = blue
  64. 7 = gorgonzola
  65. 8 = feta
  66. 9 = bat's-milk
  67. ! indicates a bit of strychnine
  68. + indicates a pinwheel
  69. . indicates a mouse turd
  70. w indicates a dead mouse carcass
  71. other characters indicate other miscellaneous objects
  72. apropos to being in a maze, with undefined semantics,
  73. so they should be considered reserved
  74. Intermouse communication is done by mouse droppings. A mouse
  75. can leave a message to some other mouse by creating a mouse
  76. dropping where it currently is (assuming it has previously
  77. eaten a piece of cheese.) Other mice can detect mouse
  78. droppings and change their behaviour based on them.
  79. How mice create droppings is defined by how each mouse is
  80. trained. These mice are somewhat magical in that they can
  81. be trained to perform physically improbable tasks, such as
  82. turning one kind of cheese into another.
  83. Mice are trained globally by the mazespace-rewriting
  84. rules. These are the guidelines by which rodents live their
  85. lives. Each rule must be on a line by itself and has the
  86. following form:
  87. *things>droppings
  88. For example,
  89. *12>21
  90. Then, when a mouse encounters a piece of American cheese,
  91. followed by a piece of Swiss cheese, it will eat them and
  92. excrete a bit of Swiss cheese followed by a bit of American
  93. cheese. This is just an example.
  94. Mice will eat cheese but will not eat mouse droppings,
  95. pinwheels, or other inedible items.
  96. Specifying strychnine, walls, or mice on the left-hand side
  97. of a rewriting rule is not guaranteed to be able to produce
  98. a match. The behaviour of specifing mice on the right-hand
  99. side of a rewriting rule is undefined.
  100. Chris Pressey
  101. Winnipeg, Manitoba, Canada
  102. Original Oct 24 2000
  103. Revised for clarity Jan 26 2002