Skip to content

htm21/automata-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automata Simulator 🤖

A Python toolkit for simulating two foundational models of computation: Cellular Automata and Turing Machines.

Cellular Automaton

A mathematical model where cells on a grid evolve step-by-step according to transition rules. This implementation supports:

  • Custom states and transition functions
  • Multiple simulation modes: n steps, until stabilization, or until a target configuration
  • Configuration save/load (JSON)
  • Detection of accepting/rejecting states

Turing Machine

A universal model of computation. This simulator reads a machine definition from a .tm file and executes it step by step.

Definition file format:

alphabet: 1 _
states: q0 q1 q_accept
initial: q0
accepting: q_accept
transitions:
q0 1 -> q0 1 R
q0 _ -> q1 1 L
q1 1 -> q_accept 1 R

Features:

  • Dynamic tape expansion
  • Step-by-step execution with state trace
  • Configurable max steps (halting problem safeguard)

Getting Started

# Cellular automaton
make run-ca

# Turing machine
python src/turing.py data/example.tm

# See all commands
make

Tech Stack

Tool Purpose
Python 3 Core language
JSON Configuration persistence
Makefile Task automation

Authors

Ahmad Hatoum

L3 Computer Science project — Université de Versailles Saint-Quentin-en-Yvelines

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors