Activity

  Knut Sondre Sæbø revised idea #4932.

If we normalize a theory into the parts that can be put on a computer, the types it uses, the nodes (specific values) it commits to, and the functions between them, we can score the theory by how many of those parts actually run.

from dataclasses import dataclass

@dataclass
class Item:
name: str
kind: str # "type", "node", or "function"
programmable: bool # does it compile and run?

@dataclass
class Theory:
name: str
items: list[Item]

plaintext
def score(self) -> float:
if not self.items:
return 0.0
ok = sum(1 for i in self.items if i.programmable)
return ok / len(self.items)

def compare(a: Theory, b: Theory) -> None:
print(f"{a.name:<20} {a.score():.0%}")
print(f"{b.name:<20} {b.score():.0%}")

Demeter theory

demeter = Theory("Demeter", [
Item("Latitude", "type", True),
Item("Temperature", "type", True),
Item("Goddess", "type", False),
Item("Emotion", "type", False),
Item("Demeter", "node", False),
Item("emotionstate", "node", False),
Item("emotion
at", "function", False),
Item("emotion_weather", "function", False),
])

Axial tilt theory

axialtilt = Theory("Axial tilt", [
Item("Latitude", "type", True),
Item("Temperature", "type", True),
Item("Angle", "type", True),
Item("Insolation", "type", True),
Item("axial
tilt", "node", True),
Item("solarconstant", "node", True),
Item("solar
angle", "function", True),
Item("insolation_at", "function", True),
Item("temperature", "function", True),
])

compare(demeter, axial_tilt)

Output metrics:
Demeter 25%
Axial tilt 100%

I'm not a programmer, so the code below is 100% AI-generated. But here is an attempt. If we normalize a theory into the parts that can be put on a computer, the types it uses, the nodes (specific values) it commits to, and the functions between them, we can score the theory by how many of those parts run.

from dataclasses import dataclass

@dataclass
class Item:
name: str
kind: str # "type", "node", or "function"
programmable: bool # does it compile and run?

@dataclass
class Theory:
name: str
items: list[Item]

plaintext
def score(self) -> float:
if not self.items:
return 0.0
ok = sum(1 for i in self.items if i.programmable)
return ok / len(self.items)

def compare(a: Theory, b: Theory) -> None:
print(f"{a.name:<20} {a.score():.0%}")
print(f"{b.name:<20} {b.score():.0%}")

Demeter theory

demeter = Theory("Demeter", [
Item("Latitude", "type", True),
Item("Temperature", "type", True),
Item("Goddess", "type", False),
Item("Emotion", "type", False),
Item("Demeter", "node", False),
Item("emotionstate", "node", False),
Item("emotion
at", "function", False),
Item("emotion_weather", "function", False),
])

Axial tilt theory

axialtilt = Theory("Axial tilt", [
Item("Latitude", "type", True),
Item("Temperature", "type", True),
Item("Angle", "type", True),
Item("Insolation", "type", True),
Item("axial
tilt", "node", True),
Item("solarconstant", "node", True),
Item("solar
angle", "function", True),
Item("insolation_at", "function", True),
Item("temperature", "function", True),
])

compare(demeter, axial_tilt)

Output metrics:
Demeter 25%
Axial tilt 100%