Options
All
  • Public
  • Public/Protected
  • All
Menu

Example Machines

These are tables of example machines.

If a cell is marked with a star ⭐, it is considered the preferred machine for that specific example. So, you can see from the star on "edge kinds" that Traffic light is the preferred machine for that example, in Useful Machines.

If a machine has a coffee cup ☕, that machine uses that feature.

 

 

Hardware machines

Name # Edge kinds Actions Hooks Properties Data Sensors After Random edges Input tape
Light switch 2
Traffic light 4
Traffic intersection 7
Practical intersection -
Intersection classifier -
Mealy vending machine -
Moore vending machine -
Locking door 3
Sally trap 3
Car door locks -
Hand counter -
Dishwasher control -
Autodialler -
Trivial CPU -
Usable CPU -
Voicemail -
Solaris USB State -

 

 

WWW machines

Name # Edge kinds Actions Hooks Properties Data Sensors After Random edges Input tape
Login -
Anon/Ident UI -
Trivial routed UI -
Complex routed UI -
Submit a form -
Music sampler -

 

 

Parsers

Name # Edge kinds Actions Hooks Properties Data Sensors After Random edges Input tape
ABAB -
Number -
Arithmetic -
Markdown -
JSON -
Javascript ES3 -
SGML -
HTML -
CSS -
Lisp -
Forth -

 

 

Protocols

Name # Edge kinds Actions Hooks Properties Data Sensors After Random edges Input tape
TCP/IP 12
BGP -
SIP -
eMMC Transfer Mode -
HTTP (Color for 0.9/1.0/1.1/2/3) -

 

 

Documentary machines

Name # Edge kinds Actions Hooks Properties Data Sensors After Random edges Input tape
States of matter 4
Water phases 4
Collatz conjecture -
Heartbeat (Little John) -

 

 

Game machines

Name # Edge kinds Actions Hooks Properties Data Sensors After Random edges Input tape
Pair of Dice -
Deck of Cards -
Tic Tac Toe -
Connect 4 -
Pong AI -
Roguelike Troll -
Play Craps -
Play Skunk -
Blackjack player -
Blackjack dealer -
Blackjack 1 on 1 -
Tamagatchi -
Konami Code Detector -
Seal AI stick balance -
1v1 Poker -
N-Player Poker -
Nim opponent -
1v1 Matchmaker -
N-Player Matchmaker -

 

 

Status machines

Name # Edge kinds Actions Hooks Properties Data Sensors After Random edges Input tape
User verification state -
Physical shipping -
Game achievements -

 

 

Conceptual machines

Name # Edge kinds Actions Hooks Properties Data Sensors After Random edges Input tape
Decision tree -
Random model -
Markhov chain -
Collatz conjecture -

 

 

Comedy machines

Name # Edge kinds Actions Hooks Properties Data Sensors After Random edges Input tape
Is It Broke? -
Pseudoscience generator 18
Punjabi name theory -
Unprison your Think Rhino -
Plugging in USB -

 

 

 

Useful Machines

Back to top

 

Light switch

Pretty obvious two-stater. Starts in Off; switches back and forth on toggle.

Off 'toggle' <=> 'toggle' On;

 

 

Traffic light

Pretty obvious two-stater. Starts in Off; turns on with enable; when on, cycles on next, or back to Off with disable. Does not offer enable or disable when not appropriate.

Off 'enable' -> Red;
Red 'next' => Green 'next' => Yellow 'next' => Red;
[Red Yellow Green] 'disable' ~> Off;

 

 

Traffic intersection

Offers six states - red yellow green for north, and the same for east. Shows red in the unnamed direction. Guarantees four-light sync at all times.

Off 'enable' -> GreenNorth;

GreenNorth 'next' => YellowNorth 'next' => RedNorth 'next' =>
GreenEast 'next' => YellowEast 'next' => RedEast 'next' =>
GreenNorth;

[GreenNorth YellowNorth RedNorth GreenEast YellowEast RedEast] 'disable' ~> Off;

 

 

TCP/IP

TCP/IP, essentially the foundation of the internet, is fundamentally defined as a state machine and currently codified on page 22 of RFC793.

A TCP/IP socket both starts and ends in Closed.

Closed 'Passive open'      -> Listen;
Closed 'Active Open / SYN' -> SynSent;

Listen 'Close' -> Closed;
Listen 'Send / SYN' -> SynSent;
Listen 'SYN / SYN+ACK' -> SynRcvd;

SynSent 'Close' -> Closed;
SynSent 'SYN / SYN+ACK' -> SynRcvd;
SynSent 'SYN+ACK / ACK' -> Established;

SynRcvd 'Timeout / RST' -> Closed;
SynRcvd 'Close / FIN' -> FinWait1;
SynRcvd 'ACK' -> Established;

Established 'Close / FIN' -> FinWait1;
Established 'FIN / ACK' -> CloseWait;

FinWait1 'FIN / ACK' -> Closing;
FinWait1 'FIN+ACK / ACK' -> TimeWait;
FinWait1 'ACK / Nothing' -> FinWait2;

FinWait2 'FIN / ACK' -> TimeWait;
Closing 'ACK' -> TimeWait;
TimeWait 'Up to 2*MSL' -> Closed;
CloseWait 'Close / FIN' -> LastAck;

LastAck 'ACK' -> Closed;

If you want to play golf, you can get that down to seven lines using lists and chaining:

Closed 'Passive open' -> Listen 'Send / SYN' -> SynSent;
[Listen SynSent] 'Close' -> Closed 'Active Open / SYN' -> SynSent 'SYN+ACK / ACK' -> Established 'FIN / ACK' -> CloseWait 'Close / FIN' -> LastAck 'ACK' -> Closed;
[SynRcvd Established] 'Close / FIN' -> FinWait1 'FIN / ACK' -> Closing 'ACK' -> TimeWait
[Listen SynSent] 'SYN / SYN+ACK' -> SynRcvd 'Timeout / RST' -> Closed;
FinWait1 'FIN+ACK / ACK' -> TimeWait 'Up to 2*MSL' -> Closed;
FinWait1 'ACK / Nothing' -> FinWait2 'FIN / ACK' -> TimeWait;
SynRcvd 'ACK' -> Established;

 

 

 

Comedy Machines

Back to top

 

Is it broke?

Punjabi Name Theory

Unprison Your Think Rhino

Pluggging In USB

Generated using TypeDoc