summaryrefslogtreecommitdiff
path: root/modeling/test_compilation.py
diff options
context:
space:
mode:
authorNiclas Dobbertin <niclas.dobbertin@mailbox.org>2024-09-05 20:23:08 +0200
committerNiclas Dobbertin <niclas.dobbertin@mailbox.org>2024-09-05 20:23:08 +0200
commitbf2f74d43a02ef01c794292bf10fa5e5652447f4 (patch)
treef364d889c4d97b406aaeb67b040439ce1d4f27eb /modeling/test_compilation.py
parentbfbf4f384c39aa42aa5e0d4ddd31f074447ed41f (diff)
test prod compile
Diffstat (limited to 'modeling/test_compilation.py')
-rw-r--r--modeling/test_compilation.py51
1 files changed, 0 insertions, 51 deletions
diff --git a/modeling/test_compilation.py b/modeling/test_compilation.py
deleted file mode 100644
index 1312494..0000000
--- a/modeling/test_compilation.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env python3
-
-"""
-Testing a simple case of production compilation. The compilation also allows for utility learning, shown in the model below, as well.
-"""
-
-import warnings
-
-import pyactr as actr
-
-class Compilation1:
- """
- Model testing compilation -- basic cases.
- """
-
- def __init__(self, **kwargs):
- actr.chunktype("state", "starting ending")
- self.m = actr.ACTRModel(**kwargs)
-
- self.m.goal.add(actr.makechunk(nameofchunk="start", typename="state", starting=1))
-
- self.m.productionstring(name="one", string="""
- =g>
- isa state
- starting =x
- ending ~=x
- ==>
- =g>
- isa state
- ending =x""", utility=2)
-
- self.m.productionstring(name="two", string="""
- =g>
- isa state
- starting =x
- ending =x
- ==>
- =g>
- isa state
- starting =x
- ending 4""")
-
-if __name__ == "__main__":
- warnings.simplefilter("ignore")
- mm = Compilation1(production_compilation=True, utility_learning=True)
-
- model = mm.m
-
- sim = model.simulation(realtime=True)
- sim.run(0.5)
- print(model.productions["one and two"])