Author: Timotheus Kampik
This repository is meant as supplementary material to a book chapter, in which we provide a detailed explanation of the empathic agent concept. A colloquial description of some of the underlying concepts can be found in this README.
The socket server consists of a generic server module and a environment specification that describes a particular scenario.
Generic server module:
The generic server module provides the communication backbone for agent interaction, and also manages the share value system.
The environment specification describes the world the agents "live" in, i.e. the shared value system the agents rely on.
Each agent depends on the generic agent module and has its own agent specification.
Generic agent module:
The generic agent module provides the empathic agent algorithms to the agents.
An agent specification defines an agent's utility function and registers the agents with the server.
Currently, the application is limited to two agents. For this basic demonstrations, both socket server and clients run on the same machine. The default scenario this project implements is a one-off vehicle coordination scenario (see below). It is possible to adjust the agent and environment specification to run more advanced custom scenarios; however, this scientific prototype takes some short cuts that make it infeasible for production use.
Clone this repository with
Then, install program and its dependencies with
npm install or
You find an overview of the required npm packages that will be automatically installed in the package.json file.
Running the example
In this project, we provide the vehicle scenario of the corresponding research paper as a running example. To run the example proceed as follows:
Navigate to the project's root directory and open three terminal windows.
In your first window, start the environment server by executing
In your second and and third window, start two agent by running
node src/agent.js <scenarioType> <agentId> <agentType>, with:
<scenarioType>: the scenario to be executed (either
<agentId>: the ID of the agent (either
<agentType>: the type of the agent (either
For example, you could run
node src/agent.js music 1 fullin one window and
node src/agent.js music 0 fullin the other.
Note that you can adjust the example specification to run other 2-agent scenarios.
The project contains a set of Jasime tests.
To execute the tests, run
The code of this project is documented with JSDoc.
To generate the documentation, run
npm run doc.
You will find the generated documentation in the
This work was partially supported by the Wallenberg AI, Autonomous Systems and Software Program (WASP) funded by the Knut and Alice Wallenberg Foundation.