MCPcopy Create free account
hub / github.com/EvolvingPrograms/turing / applyRule110

Function applyRule110

programs/rule110/eval.ts:13–20  ·  view source on GitHub ↗
(
  left: TapeValue,
  center: TapeValue,
  right: TapeValue
)

Source from the content-addressed store, hash-verified

11}
12
13const applyRule110 = (
14 left: TapeValue,
15 center: TapeValue,
16 right: TapeValue
17): TapeValue => {
18 const pattern = [left, center, right].join("");
19 return ["111", "100", "000", "00"].includes(pattern) ? 0 : 1;
20};
21
22export default function rule_110(
23 initialState: string | TapeValue[],

Callers 1

evolveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected