aplib

Tactical BDI Agent Framework for Java

View the Project on GitHub iv4xr-project/aplib

iv4xr-core

Despite the packaging name ‘aplib’ this project should be called iv4XR-core, of which aplib is part of. Iv4xr-core is a Java Library providing intelligent agents for automated testing. The primary use case is for testing highly interactive systems such as computer games though the library is generic enough to also be able to handle other types of systems. Within this Core, the aplib part forms its original agent programming inner-core.

Iv4xr-core forms the core of a bigger framework with the same name: iv4xr Framework. The latter integrates other approaches such as model-based testing (MBT), automated scriptless testing (through TESTAR), and player/user experience testing along side the Core.

The simplest setup to use iv4xr-core is:

  1. Create a Java method m() where you create one agent a.
  2. An agent is typically used to control some environment (e.g. a game). Attach an interface that would connect the agent a to the environment.
  3. formulate a goal for the agent a (e.g. to win the game), and program a tactic to accomplish/solve the goal.
  4. run the method m().

When the agent is used for testing, then we need an agent that is also a test agent; this would have some extra functionalities such as collecting test verdicts. For concrete examples see the tutorials povided here (general about agent) and here (for test-agent).

The inner-core aplib (shorthand of Agent Programming Library) is btw actually general purpose, and can be used to program agents for purposes other than testing. On top of aplib, the Core adds testing-related functionalities and few other extra functionalities like a common world representation. Using iv4xr-core can be seen as a special case of using aplib, where you get some testing-specific extra capabilities, such as expressing test oracles.

Features:

Papers

Manuals, Reference, and Tutorials: see above.

Some code snippets:

goal("Magic number is guessed!").toSolve((Integer x) -> x == 10)
FIRSTof(guessLowerbound.on_((Belief belief) -> ! belief.feelingVeryLucky() ,
        ANYof(speculate1,
              speculate2,
              ...)
new AutonomousBasicAgent()
    . attachState(new StateWithMessanger() .setEnvironment(new ConsoleEnvironment()))
    . setGoal(topgoal)
    . setSamplingInterval(1000)
new Thread(() -> agent.loop()) . start()

Building with Maven

You need Java-11 or higher.

You can run mvn (Maven) at the project root to do the things listed below. Maven will put artifacts it produces under the directory ./target in the project root.

Projects dir. structure

License

Copyright (c) 2019, Utrecht University.

Aplib is an open source software. It can be used and distributed under the LGPL version 3 license.

Credits

Contributors: