Skip to content

Instantly share code, notes, and snippets.

@Ljzn
Ljzn / playground.rs
Created August 1, 2020 08:04 — forked from rust-play/playground.rs
Code shared from the Rust Playground
fn main() {
// Linjie Zhang 2020
//
// 3-state busy beaver
// https://en.wikipedia.org/wiki/Turing_machine
let rules = vec!["A01RB", "A11LC", "B01LA", "B11RB", "C01LB", "C11RH"]
.iter()
.map(|x| x.chars().collect::<Vec<char>>())
.collect::<Vec<_>>();
@Ljzn
Ljzn / playground.rs
Created August 1, 2020 06:01 — forked from rust-play/playground.rs
Code shared from the Rust Playground
fn main() {
// Linjie Zhang 2020
//
// T simple turing machine
//
// https://plato.stanford.edu/entries/turing-machine/#DefiTuriMach
#[derive(Debug)]
struct Machine {