TuringMachine.jl
Julia-based Turing machine simulator
Install / Use
/learn @tfburns/TuringMachine.jlREADME
Turing Machine Simulator v0.1.0
| Travis Status | AppVeyor Status | Code Test Coverage |
| :----: | :----: | :----: |
| |
|
|
Turing machines were invented in 1936 by British mathematician and computing pioneer Alan Turing. They are machines which can compute any algorithm. Granted, they may be verbose or inefficient compared to other computing strategies, but nevertheless they are capable of computing arbitrary algorithms.
This simulation of a Turing machine uses Tibor Radó cards to store instructions to make programs. The machine uses a single tape, simulated by two stacks - one storing information to the left of the head, and one storing information to the right of the head. For programmatic convenience in this simulation, the stack storing information to the right of the head also holds the cell which the head is currently reading from and at the position of.
Files
TuringMachine.jlholds the main simulation and helper functions.example.jlshows an example of how to read in a program, initial data, and then simulate the program by calling functions fromTuringMachine.jl.example_program_1.txtis a set of Radó cards for a Turing machine to compute whether a binary number is divisible by 3. Blank lines and lines starting with//are discarded.initis the initial starting state, andhaltis a halting state. Instructions may appear in arbitrary order but with the format:state, value of current cell, state to move to, value to replace in the first cell, movement on the tape, e.g.q2,0,q1,0,>means: when at stateq2and the head reads a0, write a0and go to stateq1, then move the tape one step>(to the right).example_input_1.txtis a binary input string which is placed starting from under the reading head and then extending right-ward from the head.
Related Skills
node-connect
338.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
338.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.4kCommit, push, and open a PR
