Dilemma

From Esolang
Jump to navigation Jump to search

Dilemma is invented by User:A.

Drafts

Maze language based on a searching algorithm (DFS) that does not remember the way it goes. There is still a mechanism available to make sure that the pointer doesn't go back to its previous position via blocking the previously went block and then removing the block once there is one instruction execution (4 turn-checks) away.

‼░░
└┬┘
█┼░

The direction priority is clockwise; i.e. it tries to go with a direction. If it fails, it turns right and tries again. Atoms:


Atom █. This is where you start the maze. Direction is initially right. You also end the maze here by going back. 

Atom ┼. Direction splitter. You are allowed to pass through the current instruction direction, its reversed direction, and the direction above perpendicular. If you go through using a specific direction the direction will be deactivated, although you are still allowed to enter the cell.

Direction right: 
  ^
<─┴─>

Direction down: 
  ^
  ├─>
  v

Direction left: 
<─┬─>
  v
Direction up: 
  ^
<─┤
  v

Atom ░. NOPs, the PC is allowed to pass through in any direction.

Atoms └┬┘. Vertical direction splitter. Only allowed to pass through the pointed directions.

Atom ‼. PC is only allowed to pass through the opposite direction of the program counter.

Execution of this program

‼░░
└┬┘
█┼░

Executed:
█┼░┼┬┘░░‼░░┘┬└‼└┬┼█

a 12-byte program can compress a 19 byte program!