Skip to content
Tushar Semwal edited this page Jun 24, 2019 · 45 revisions

Welcome to the Project Tartarus wiki!

Introducing Tartarus

Written in SWI-Prolog, Tartarus, facilitates users to create overlay sort of network of nodes comprising either a single PC/laptop/embedded system or several such devices connected as a LAN (wired/wireless) and then program both static and mobile agents. Agents in Tartarus are basically programs written in Prolog. They can be programmed to perform tasks autonomously at select nodes and even migrate to others in the network they inhabit. Such agents can even be programmed to clone (copy and multiply) on-the-fly and then move around the network and execute tasks concurrently, providing a distributed and decentralized processing environment. These agents can also carry programs as payloads. Payloads could be written in Prolog or Python and executed at desired nodes. One could try out using other languages as well. Agents can communicate amongst one another and also with programs at a node. As of now, Tartarus can be run on Windows, Ubuntu and Raspbian operating systems. Tartarus can run on the Raspberry Pi. It can be used to sense the sensors on-board and also control the actuators (motors, relays, etc.) connected to the board.

For an interactive gist, please watch this video:

Getting Started

Since Tartarus runs over SWI-Prolog the first step is to ensure that you have the latter installed on your system. SWI-Prolog can be downloaded from www.swi-prolog.org. Also ensure that you have Java installed, in case you need to use Lego NXT Robots.

Note: All through this manual, the terms Tartarus and Platform have been used interchangeably.

Installing and Loading the Tartarus platform

(i) For Windows OS

Follow the steps below to install Tartarus on your Windows-based machine:

  1. Download and install the SWI-Prolog on your system. SWI-Prolog can be downloaded from here.
  2. Run the Tartarus installer file which can be downloaded from here.
  3. There are two ways to load the Tartarus platform on SWI-Prolog:
  • If you are new to SWI-Prolog, just double-click on the Tartarus icon. This will open an SWI-Prolog instantiation with Tartarus pre-loaded onto it. You can now go ahead to use Tartarus.
  • For others who use SWI-Prolog, just consult (load) the platform.pl file resident in the Tartarus directory.

(ii) For Debian based OS (Ubuntu, Raspbian Jessie)

  1. Install SWI-Prolog using the command: sudo apt-get install swipl
  2. Download the tarball from here.
  3. Untar the tarball to any desired location in your system. Use the following command to untar the tarball: tar -xvf <tar ball> -C <desired location>
  4. In a new command line terminal, type: $ swipl
  5. This will start an SWI-Prolog session. Now to load the Tartarus platform, enter the command: consult(‘/home/<Installed Tartarus directory>/platform.pl’).

Tartarus Built-in Predicates

Tartarus provides a range of predicates to be used in conjunction with agent programming. They have been categorized below for convenience.

Platform predicates Agent predicates Log Server Miscellaneous
start_tartarus/2 create_mobile_agent/3 set_log_server/2 get_new_name/2
close_tartarus/0 create_static_agent/3 send_log/2 get_new_name_alpha/1
reset_tartarus/0 purge_agent/1 - -
print_tartarus_status/0 execute_agent/3 - -
assert_file_to_tartarus/1 execute_agent/4 - -
get_tartarus_details/2 add_payload/2 - -
set_token/1 remove_payload/2 - -
load_tartarus_state/1 clone_agent/3 - -
save_tartarus_state/1 move_agent/2 - -
- add_token/2 - -
- save_agent/2 - -
- isexist_agent/3 - -
- list_agent/0 - -

AgPi: An interface for Tartarus and Raspberry Pi

Tartarus has transcended its predecessor by diving into the realm of embedded systems such as Raspberry Pi. Through a WiringPi-Prolog wrapper, the mobile agents can now access the hardware inputs and output pins of a Raspberry Pi, making Tartarus a cross-device emulator software. To avail AgPi and know more about it, click here!