Skip to content

yan-elena/nagent-adapt

Repository files navigation

Normative Agent with Regulation Adaptation Capability

This repository provides a prototype implementation of a regulation adaptation model for Multi-Agent Systems (MAS), based on a normative BDI agent architecture using JaCaMo with the adaptation capability, and integrated with the SAI and NPL(s) normative engines.

Extended Normative Interpreter

The directory src/java/adaptation contains the extensions to the NPL(s) normative engine for regulation adaptation.

The class NPLAInterpreter is an extended NPL(s) interpreter that provides an interface for regulation adaptation by adding, modifying, and removing norms and sanctions rules.

Extended Normative Agent Architecture

nagent-adapt

The directory src/java/agent contains the normative agent architectures integrating the normative engines for regulation adaptation.

The class ANormativeAgentNPL is the extended Jason normative agent architecture integrated with NPL(s) that uses the extended NPLAInterpreter for regulation adaptation. It requires as an argument a .npl file that specifies the norms and sanction rules for the agent.

The class NormativeAgentSAI is the extended Jason normative agent architecture integrated with NPL(s) and the SAI normative engine to compute also constitutive norms. It requires as arguments a .npl file that specifies the norms and sanction rules for the agent and a .sai file that specifies the constitutive norms for the agent.

The class ANormativeAgentSAI is the extended Jason normative agent architecture integrated with NPL(s) and SAI normative engines and uses the extended NPLAInterpreter for regulation adaptation. It requires as arguments a .npl file that specifies the norms and sanction rules for the agent and a .sai file that specifies the constitutive norms for the agent.

The directory src/java/actions provides Jason internal operations for regulation adaptation. Available operations are:

  • add_norm
  • add_sanction_rule
  • modify_norm
  • modify_sanction_rule
  • remove_norm
  • remove_sanction_rule

Usage

To use the extended normative agent architecture in a JaCaMo project, it is required to add the following dependencies in your build.gradle file:

repositories {
    maven { url "https://raw.githubusercontent.com/jacamo-lang/mvn-repo/master" }
    maven { url "https://raw.githubusercontent.com/yan-elena/mvn-repo/refs/heads/main" }
}

dependencies {
    implementation('org.jacamo:jacamo:1.3.0')
    implementation('org.jacamo:nagent-adapt:1.0')
}

After that, you can use the normative agent architecture in the .jcm file to define agents. For example, to define an agent alice using the ANormativeAgentSAI architecture:

agent alice {
    ag-class: adaptation.agent.ANormativeAgentSAI("src/reg/alice_norms.npl", "src/reg/alice_constitutive.sai")
}

where src/reg/alice_norms.npl defines the regulative norms and sanction-rules and src/reg/alice_constitutive.sai defines the constitutive norms for the agent alice.

Example

A JaCaMo demonstration example is available in the folder. See demo.jcm for the JaCaMo configuration. To run the example, use the following command:

./gradlew

Note: Java version >= 21 is required.

About

A normative BDI JaCaMo agent with the adapt capability

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published