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 |
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
(define-syntax amb-parallel | |
(syntax-rules () | |
((_ arg1 arg2) | |
(receive (pipefd0 pipefd1) (create-pipe) | |
(let ((pid (process-fork))) | |
(if (eq? pid 0) | |
(let ((pipefd1_port (open-output-file* pipefd1))) | |
(write (amb-collect arg2) pipefd1_port) ;we can't backtrack into parent so we collect all of this level's results | |
(close-output-port pipefd1_port) | |
(exit 0)) ;child is done |
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 (chicken process) (chicken file posix)) | |
(define-syntax parallel-list | |
(syntax-rules () | |
((_ arg1 arg2) | |
(receive (pipefd0 pipefd1) (create-pipe) | |
(let ((pid (process-fork))) | |
(if (eq? pid 0) | |
(begin (write arg1 (open-output-file* pipefd1)) | |
(exit 0)) ;child is done |
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 (chicken process) (chicken string) (chicken file posix) amb) | |
(define-syntax amb-parallel | |
(syntax-rules () | |
((_ arg1 arg2) | |
(let-values (((pipefd0 pipefd1) (create-pipe))) | |
(let ((pid (process-fork))) | |
(begin (if (eq? pid 0) | |
(begin (file-write pipefd1 (string-append (->string arg1) "\n")) | |
(exit 0)) ;child is done |
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
python3 timing.py | |
Starting 4 tests with 10 runs each, grab a coffee! | |
== | |
Compilation started. | |
Compilation complete. | |
TEST: !(factorial 30) | |
[265252859812191058636308480000000] | |
[265252859812191058636308480000000] | |
........ | |
Time MeTTa: avg=3.9196492433547974 seconds, var=0.019423207564014434 |
NewerOlder