Skip to content

MutantCacti/mlql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mlql

Graph-based cellular automata in C with evolutionary rule learning.

Usage

./mlql --nodes "v1;v2;..." --edges "s,d;..." --rules "CMP,thresh,OP,val;..." --steps N [--delay MS] [--max-cells N]

Example:

./mlql --nodes "22;33;11" --edges "0,1;2,1" --rules "GT,5,SUB,2" --steps 20 --delay 100

Arguments:

  • --nodes: Semicolon-separated initial cell values
  • --edges: Semicolon-separated edges as src,dest pairs (optional)
  • --rules: Semicolon-separated rules as CMP,threshold,OP,operand
  • --steps: Number of simulation steps to run
  • --delay: Optional per step delay in milliseconds
  • --max-cells: Optional cell limit (default: 10000)

Python CLI

# Train a model
mlql train --config models/config.json

# Run a trained model
mlql run --model models/my_model.mlql [--steps N] [--visualise]

Installation

ln -s /path/to/mlql/py/mlql.py ~/.local/bin/mlql

Commands

train - Train a model using evolutionary search

  • --config, -c: Path to training config JSON file (required)

run - Run a trained model

  • --model, -m: Path to model .mlql file (required)
  • --steps, -s: Number of simulation steps (default: 100)
  • --visualise, -v: Show live visualisation

Model Format (.mlql)

Simple 3-line text file:

nodes (semicolon-separated values)
edges (src,dest pairs)
rules (CMP,thresh,OP,val)

About

Graph-based cellular automata in C with evolutionary rule learning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors