Skip to content

Instantly share code, notes, and snippets.

@PtrMan
Created May 28, 2020 11:48
Show Gist options
  • Save PtrMan/56decbd00d321dff19b41463c31cf141 to your computer and use it in GitHub Desktop.
Save PtrMan/56decbd00d321dff19b41463c31cf141 to your computer and use it in GitHub Desktop.
ONA experiments
print("*motorbabbling=false")
#encode a field as a term
def encField(y,x):
name = str(y)+"Y"+str(x)
return "<f"+name+" --> F"+name+">"
# encode maze
for ix in range(10):
for iy in range(10):
print("<( "+encField(iy,ix)+" &/ ^pick ) =/> "+encField(iy,ix+1)+">. {1.0 0.98}")
print("<( "+encField(iy,ix)+" &/ ^pick ) =/> "+encField(iy+1,ix)+">. {1.0 0.98}")
print("")
# encode position where we are
print(encField(1,1)+". {1.0 0.98} :|:")
print("")
# give time to reason
for t in range(100*2):
print(encField(9,9)+"! :|:")
print("10") # give time to reason
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment