Skip to content

jfcloutier/karma_agency

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

314 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Karma Agency

THIS REPO IS UNDER CONSTRUCTION

Getting started

Use the development version of SWI-PROLOG (https://www.swi-prolog.org/build/PPA.html)

% sudo apt-add-repository ppa:swi-prolog/devel
% sudo apt-get update
% sudo apt-get install swi-prolog

Install xterm

sudo apt-get install xterm

Define ~/.config/sw-prolog/init.pl

:- set_prolog_flag(history, 50).
:- use_module(library(clpfd)).
:- use_module(library(threadutil)).
:- set_prolog_flag(double_quotes, chars).

ttrace(Thread) :-
    thread_signal(Thread, (attach_console, trace)).

tnotrace(Thread) :-
    thread_signal(Thread, (attach_console, notrace)).

Dependencies

Clone the following repos in the same directory that contains the karma_agency directory:

  • Karma Prolog Utils - Prolog utility modules
  • Karma Actors - Prolog actor framework
  • Karma Apperception - A practical Apperception Engine
  • Karma Body - Elixir code giving access to the robot's sensors and motors, embodied or simulated
  • Karma World - Elixir code implementing a virtual, simulation environment - to accelerate the development of Agency

Running the app

% Start agent with the domain and port where th body is hosted

?- [load].
?- agent:start('localhost:4000').

Running the tests

?- [load].
?- [load_tests].
?- run_tests.

Tools

To debug a thread named t1, do

% To use GUI tracer
guitracer.
% To instrument the thread for tracing
tdebug(t1).
% To initiate tracing on the thread, with output in an XTerm window
ttrace(t1).
% to stop tracing
tnotrace(t1).
% to disable debugging a trace
tnodebug(t1).

See also

About

Prolog app implementing functions that impart agency to a robot, namely apperception, a fitness evaluation, an evolving society of mind, event-based communication, and an interface to the agent's body (real or simulated)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages