This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Input: Whales are mammals that live in the ocean. | |
| <(whale * ocean) --> live_in>. :|: {1.0 0.9} | |
| //Input: Animals that live in the ocean are marine animals. | |
| <(animal * ocean) --> live_in>. :|: {1.0 0.9} | |
| <animal --> marine_animal>. :|: {1.0 0.9} | |
| //Input: Marine mammals are exposed to pollutant P. | |
| <(marine_animal * pollutant_p) --> are_exposed_to>. :|: {1.0 0.9} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %Finding divisors | |
| 'find-divisor'(A, B, C) :- | |
| *(B, B, D), | |
| >(D, A, E), | |
| ( E==true | |
| -> C=A | |
| ; C=F, | |
| '%'(A, B, G), | |
| ==(0, G, H), | |
| ( H==true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (foo 1) | |
| (foo 2) | |
| ;Ok: Leads to unnecessary 'and' and 'empty' invocation in compiled output: | |
| (= (match-single1 $space $pat $ret) | |
| (if (and (= $x (match $space $pat $ret)) (cut)) | |
| $x (empty))) | |
| ;Bad: Leads to unneccesary maybe_call which is expensive: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ((step app) | |
| (, (num $1) ) | |
| (, (num (M $1)) | |
| (num (W $1)) )) | |
| ((step app) | |
| (, (num (M $1)), | |
| (num (W $1)) ) | |
| (, (num (C $1)) )) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Needed: | |
| pip3 install requests-sse | |
| client.py: | |
| Replace /target/debug/mork_server with /target/release/mork_server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Exhaustive-until-depth deriver | |
| (= (Derive $derivationsLast $beliefs $depth $maxdepth) | |
| (if (> $depth $maxdepth) | |
| $beliefs | |
| (let $derivations | |
| (collapse (superpose ((let* (((Sentence $x $Ev1) (superpose $derivationsLast)) | |
| ((Sentence $y $Ev2) (superpose $beliefs)) | |
| ($stamp (TupleConcat $Ev1 $Ev2))) | |
| (if (StampDisjoint $Ev1 $Ev2) | |
| (case (|- $x $y) ((($T $TV) (Sentence ($T $TV) $stamp)))) (empty))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;PLN for MeTTa-Morph, based on PLN 0f2e0008f82cefdf53585d0bc103489e00b77de7 of June 12, 2025. | |
| ;What made it work: | |
| ;1. mettamorph extension for (empty) | |
| ;2. removal of functions that are already in the stdlib of mettamorph | |
| ;3. Replaced if occurrences with If of Mettamorph | |
| ;4. Represented implication sentences with functions to avoid floating vars | |
| ;mettamorph extension: | |
| (= (empty) ()) ;todo make it call amb-failure-continuation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !(import! &self motto) | |
| !(let $x ((chat-gpt-agent "gpt-4o-mini") | |
| (system "You are an assistant. Answer as a tuple (R a b) (no commas) where R in {near} and a,b in {human, robot, chair}") | |
| (user "the robot is close to the chair!")) | |
| (let $L ((py-dot ((py-dot ((py-dot $x replace) "(" "" ) replace) ")" "") split) " ") | |
| (let ($R $a $b) | |
| (((py-dot $L __getitem__) 0) | |
| ((py-dot $L __getitem__) 1) | |
| ((py-dot $L __getitem__) 2)) | |
| (EXTRACTED: (R = $R) (a = $a) (b = $b))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [component_container_isolated-10] [INFO] [1733948499.855052061] [controller_server]: Received a goal, begin computing control effort. | |
| [component_container_isolated-10] [INFO] [1733948502.957650038] [controller_server]: Passing new path to controller. | |
| [component_container_isolated-10] [ERROR] [1733948503.930128544] [planner_server]: Failed to create a plan from potential when a legal potential was found. This shouldn't happen. | |
| [component_container_isolated-10] [WARN] [1733948503.930219308] [planner_server]: GridBased plugin failed to plan from (1.36, 1.68) to (2.80, 1.17): "Failed to create plan with tolerance of: 0.500000" | |
| [component_container_isolated-10] [WARN] [1733948503.930227143] [planner_server]: [compute_path_to_pose] [ActionServer] Aborting handle. | |
| [component_container_isolated-10] [INFO] [1733948503.956205964] [controller_server]: Passing new path to controller. | |
| [component_container_isolated-10] [ERROR] [1733948503.956302770] [controller_server]: Path is empty. | |
| [component_container_isolated-10] [INF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import deque | |
| from copy import deepcopy | |
| import sys | |
| import time | |
| import random | |
| # THE WORLD | |
| world = """ | |
| oooooooooooo | |
| o o f o |
NewerOlder