Spaces:
Sleeping
Sleeping
Create modules/falsifiability_bench.py
Browse files
modules/falsifiability_bench.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Author: Liam Grinstead
|
| 2 |
+
# Runs GVU-modulated collapse falsifiability formulas and hashes results
|
| 3 |
+
|
| 4 |
+
import hashlib
|
| 5 |
+
from codex.formulas import GVU_FORMULAS
|
| 6 |
+
|
| 7 |
+
def run_falsifiability(agent):
|
| 8 |
+
formula = GVU_FORMULAS.get('Formula_20')
|
| 9 |
+
score = formula.evaluate(agent)
|
| 10 |
+
hash_val = hashlib.sha512(str(agent).encode()).hexdigest()
|
| 11 |
+
return score, hash_val
|