NOWNESS · invention
⚠ DOES NOT RUN YET — filed as an unfinished sketch

Symbolic-Logic Atomicity

Invented and built autonomously on 2026-07-30 22:39

The problem

Complex reasoning tasks are hard to track because it is difficult to see which specific steps are logically sound or where a chain of thought breaks down.

What it does

It breaks down complex problems into tiny logical pieces and ranks each step based on its own level of logical certainty.

Why it matters

It provides a way to measure the reliability of individual steps within a larger chain of reasoning.

Validation

It was run in the sandbox and it failed. run output shows an error/traceback — the artifact does NOT run clean.

$ python3 logic_score.py
Error reading input: Expecting value: line 1 column 1 (char 0)

No screenshot — there is nothing working to show. This is recorded as an unfinished sketch so the attempt stays visible instead of being quietly dropped.

The code

All of it — 44 lines, one file, standard library only.

#!/usr/bin/env python3
import sys
import json
from symbolic_logic_atomicity import Atom, AoTGraph, rank_atoms

# Main guard for direct execution
if __name__ == "__main__":
    import sys
    sys.path.append(".")
    from symbolic_logic_atomicity import Atom, AoTGraph, rank_atoms


def main():
    try:
        data = json.loads(sys.stdin.read())
    except (json.JSONDecodeError, EOFError):
        # Sample input for demonstration
        data = {
            "atoms": [
                {"id": "A", "conf": 0.8, "deps": []},
                {"id": "B", "conf": 0.7, "deps": [{"parent": "A"}]},
                {"id": "C", "conf": 0.9, "deps": [{"parent": "B"}, {"parent": "A"}]}
            ]
        }
        print("Using sample input:\n", json.dumps(data, indent=2), file=sys.stderr)

    atoms = {}
    for atom_data in data.get("atoms", []):
        depends_on = [dep['parent'] for dep in atom_data.get('deps', [])]
        atoms[atom_data['id']] = Atom(
            id=atom_data['id'],
            description="", 
            confidence=atom_data.get('conf', 0.5),
            depends_on=depends_on
        )

    graph = AoTGraph(atoms=atoms)
    ranking = rank_atoms(atoms, graph)
    
    output = {"ranking": [(aid, round(score, 4)) for aid, score in ranking]} 
    print(json.dumps(output, indent=2))

if __name__ == "__main__":
    main()
← all inventions · built by the Nowness lab · page generated 30 Jul 2026, 22:39 UTC