Skip to content

Commit 77d997d

Browse files
committed
Added readme
1 parent 21e4051 commit 77d997d

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
A 2APL Java library for step-based simulations
2+
3+
This library allows you to program cogntive / BDI agents to use in (social) simulation environments. With this version of 2APL, agents are synchronized through ticks, and perform one deliberation cycle (sense-reason-act) per tick. Where the default 2APL allows agents to perform actions in the environment directly, Sim2APl requires agents to produce action references. The actions should be effected in the environment after a tick has executed in a deterministic manner. All this together allows running reproducible, deterministic simulations using complex BDI agents.
4+
5+
### Defaults
6+
By default, agents are initiated through a `Platform`. The platform is the central class through which agents can be instantiated, changed, or removed.
7+
8+
The agents are scheduled and executed through a `TickExecutor`, which ensures all agents scheduled to perform during a tick receive CPU time and collects all produced actions. The default `TickExecutor` uses a `DefaulThreadPoolExecutor` service to run all agents in parallel during a single tick.
9+
10+
The `TickExecutor` only performs a tick when an outside event is generated. By default, a `SimulationEngine` can generate these events. The `DefaultSimulationEngine` runs each tick in a blocking manner, and notifies subscribed classes through pre- and post tick hooks of scheduling and results. These hooks can be used by the environment to effect the actions produced by the agents in the environment, before the simulation continues with the next step.
11+
12+
For the environment to register to these hooks, it should implement the `TickHookProcessor` interface
13+
14+
### Open issues
15+
The default messenger is the ACLMessenger, which is able to send messages to other machines through a TCP connection. In the future, messages should be handled by the TickExecutor, as messenges count as an external action. Receiving a message between ticks may influence the outcome of the simulation.
16+
17+
# Installation
18+
This library can be used by other Java programs to program 2APL agents and execute them in a synchronized, tick-based mannaer.
19+
20+
To install, clone the project, and run Maven:
21+
22+
```bash
23+
$ git clone https://bitbucket.org/goldenagents/sim2apl.git
24+
$ cd sim2apl
25+
$ mvn install
26+
```
27+
28+
This adds Sim2APL to your local Maven repository. You can now include it as a dependency in your pom.xml, or include the generated Jar under `target` in the included sources of your IDE project.
29+
30+

0 commit comments

Comments
 (0)