From Esolang
Jump to navigation Jump to search

Rotpai is an esoteric programming language made by User:Mipinggfxgbtftybfhfyhfn.

Syntax and execution

A Rotpai program is a list of ordered pairs of characters:

ah ba bd fg

Each line of the program is independent of every other line unless the last character of the last pair of it is "." (without the "), then the line wuth this propertie and the next line are coinsidered to be just one line:


is the same as:

a. bc

At each step of the program, to generate the next state, the interpreter goes through this proces for each pair:

  1. If the pair doesnt match in any of its ends to the adjasent pairs, it is rotated (ab ca cd => ab ac cd)
  2. If the pair matches in one of its ends, its changed which the pair at thet end (ab ac cd => ab cd ac)
  3. If the pair matches on bought of its ends, do nothing to it (ab bc cd => ab bc cd)

An end towching the adge is coinsidered to always match.
The program halts when none of the pairs can be rotated.

Computational Class

Rotpai's computational class is unclear, but it is most likely a finite state automaton.