Horse
Designed by | RainbowDash |
---|---|
Appeared in | 2025 |
Memory system | Counters |
Computational class | Turing complete |
Reference implementation | Python |
File extension(s) | .horse |

Horse is a programming language. Where you race horses.
Overview
Horse is inspired by blindfolded arithmetic and counter machines. In horse, each program contains multiple "horses" (independent processes) that perform simple operations on other horses in discrete time steps (ticks). Every horse has a value, that other horses and itself can increment or decrement, as well as check the value of the horse. When you decrement or increment another horse it sends a "signal" to that horse. Collisions (multiple signals to the same horse in the same tick) cause the horse to ignore all instructions sent to it (such as increment) and triggers a "Collision case" in which the horse will run that code inside the case.
Syntax
Every horse is defined by a name and one or more command cases:
HORSE_NAME <skip: [statements]> <[collision]>
- HORSE_NAME: Identifier (letters, digits, spaces allowed).
- skip (optional): A positive integer controlling execution frequency (default 1).
- statements: A sequence of command blocks enclosed in
[]
. - collision (optional): Special case executed only when there is a collision.
A sample horse definition:
JOVIAL MERRYMENT <1:[RANDOM]5:[PRINT]> <[HALT]>
This horse moves randomly every 1st tick (1:
) then every 5th tick (5:
) it prints its value. If two or more horses modify this horse in the same tick, it executes [HALT]
and stops the entire program.
Execution Model
Programs run in discrete ticks numbered 1, 2, 3, … until a HALT
command is encountered. At each tick:
- Each active horse whose skip count divides the current tick evaluates its commands for that tick count in order from left to right.
- Within each case, all leading conditions (
=
or!=
) are tested; only if all pass is the next command executed. - Signal collection: Increment/decrement operations are queued as signals; collisions (≥2 signals to same target) are detected, this is what is checked in a collision.
- Signal processing: Non‑collision signals modify horse values immediately; collisions trigger the horse's collision case (if present) and skip normal actions.
- Other commands (
PRINT
,RANDOM
,COLLAPSE
,HALT
) execute in sequence. - Horses marked collapsed are skipped in subsequent ticks.
Available Commands
[NI]
/[ND]
: Increment (I) or decrement (D) current horse by N.[HorseName NI]
/[HorseName ND]
: Modify another horse by N.[PRINT]
: Print the current horse's numeric value.[PRINT Target]
: Print target horse's value[PRINT "text"]
: Print a string message.[Horse1 = 5]
/[Horse1 != 5]
: Conditional; next block only runs if conditional is true.[RANDOM]
: Add +1 or −1 to current horse at random.[RANDOM Target]
: Randomize another horse.[COLLAPSE]
: Deactivate self (no more execution).[HALT]
: Stop entire program immediately.
Programming tips
Horse relay
A "Horse relay" is where one horse sends a signal, to cause another horse to run a command that affects that horses self.
Horse <3:[Beacon 5I]> Beacon <2:[Beacon = 5][Beacon 5D]> OtherHorse <1:[Print][Beacon = 5][Collapse]>
Above is a horse relay, which on the 3rd tick increments beacon. Which OtherHorse sees that beacon is 5 and collapses. Meanwhile, beacon sees itself is 5 and sets itself back to zero.
Conditional Layering
You can chain together conditionals in order to create an AND statement of any length.
[Horse A = 5][Horse B = 5][PRINT "Horse A and Horse B are both 5"]
Turing Completeness
Horse is Turing complete because using two counters (Horses), it is possible to simulate a Turing machine. (Proof)
Examples
Count out 100
Counter <1:[Counter 1I][Print][Counter = 100][HALT]>
Fibonacci Sequence
START <1:[REGB 0I][REGC 1I][COLLAPSE]> REGA <1:[STATE=0][PRINT][STATE=0][STATE 1I][REGB=0][STATE=1][STATE 1I][STATE = 1][REGC 1I][STATE = 1][REGB 1D][REGC=0][STATE=2][STATE 1I][STATE = 2][REGB 1I][STATE =2][1I][STATE = 2][REGC 1D][REGA=0][STATE=3][STATE 1I][STATE = 3][REGA 1D][STATE = 3][REGC 1I][REGB=0][STATE=4][STATE 1I][STATE = 4][1I][STATE = 4][REGB 1D][REGC=0][STATE=5][STATE 1I][STATE = 5][REGB 1I][STATE = 5][REGC 1D]> REGB REGC RESET <1:[STATE = 6][STATE 6D]> STATE
Hello world
HELLO WORLD <1:[PRINT "Hello world"][HALT]>
Horse Race
DOWNTOWN SKYBOX <1:[RANDOM][DOWNTOWN SKYBOX = -1][DOWNTOWN SKYBOX 1I][PRINT]> BULLETN BOARD <1:[RANDOM][BULLETN BOARD = -1][BULLETN BOARD 1I][PRINT]> JOVIAL MERRYMENT <1:[RANDOM][JOVIAL MERRYMENT = -1][JOVIAL MERRYMENT 1I][PRINT]> WINNER <1:[DOWNTOWN SKYBOX = 100][PRINT "DOWNTOWN SKYBOX WON"][DOWNTOWN SKYBOX = 100][HALT][BULLETN BOARD = 100][PRINT "BULLETN BOARD WON"][BULLETN BOARD = 100][HALT][JOVIAL MERRYMENT = 100][PRINT "JOVIAL MERRYMENT WON"][JOVIAL MERRYMENT = 100][HALT]>