We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Supervised P with Printing
Supervised P with Printing is a program which uses artificial intelligence. Specifically, it uses a supervised learning algorithm to correlate certain kinds of input to certain kinds of output.
Sub-Language (P)
The program implements a programming language called "P" which is similar to the programming language P′′. It works on an infinite tape of 32-bit cells and the pointer can go in either direction. It has the following commands:
| Command | Description |
|---|---|
R
|
Move the tape-head rightward one cell |
L
|
Increment the value of the current cell (it overflows to 0 if greater than 32 bits) and move the tape-head leftward one cell |
(
|
If the current cell's value is 0, skip past the corresponding )
|
)
|
If the current cell's value is not 0, skip to the instruction after the corresponding (
|
P
|
Output the value of the current cell as a Unicode character. |
Specification
The code needs to be split into two parts: the training code and expected effect, and the testing code.
In the former, valid P'' code is correlated with the final state of the tape and the expected output, if any. The way the tape and expected output are displayed isn't fundamentally important.
The testing code basically ensures whether the interpreter in question is a "valid" interpreter. There are two levels of validity:
- Easy Level: The interpreter is valid if it can tell whether or not the code outputs anything and whether or not it changes the tape.
- Hard Level: The interpreter is capable of correctly predicting the output of the test suite and the final state of the board over 50% of the time (no, really think about it, that's actually very hard).
The training code and expected output train the algorithm while the resultant code is the one you actually want to run.
Computational Class
The language is not Turing-complete because it is total. It literally cannot indicate that an infinite loop would happen. It can pretend that an infinite loop would happen, but it will always halt on any input.