Architecture Overview
Modules
1. turing_machine.py
Defines the TuringMachine
class, encapsulating the behavior of a Turing machine. It manages the tape, head position, current state, and execution steps.
2. simulation.py
Handles the enumeration and simulation of all possible Turing machines based on defined states and symbols. Utilizes multiprocessing to parallelize simulations for efficiency.
3. utils.py
Contains utility functions and shared constants to support other modules.
Workflow
-
Enumeration: Generates all possible transition functions based on the number of states and symbols.
-
Simulation: Each transition function is simulated using the
TuringMachine
class to determine if it halts and its productivity. -
Aggregation: Collects results to identify the most productive and longest-running halting machines.
Future Enhancements
-
Configurable Parameters: Allow dynamic configuration of states, symbols, and other parameters via configuration files or command-line arguments.
-
Optimization: Implement more efficient algorithms or heuristics to reduce the simulation space.
-
Visualization: Add visualization tools to represent machine behavior and tape states.
-
Extended Testing: Increase test coverage for more robust validation.