Skip to content

Propositional Logic Agents with the JADE platform and SAT4J

Notifications You must be signed in to change notification settings

marcmelis/barcenas-world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 

Repository files navigation

barcenas_world

Propositional Logic Agents with the JADE platform and SAT4J.
You can find a copy of this repository at https://github.com/markankaro/barcenas-world.
The goal of this practice is to modelize a problem with Propositional Logic and implement it.

Requirements

Usage

$ java jade.Boot -agents 'BarcenasWorld:BarcenasWorldEnv(<worldDimension>,<barcenas_x>,<barcenas_y>,<mariano_x>,<mariano_y>);Finder:BarcenasFinder(BarcenasWorld,<worldDimension>,<stepsfile.txt>)'

Where:

  • worldDimension: lenght of one side of the square map
  • barcenas_x, barcenas_y: position of Barcenas
  • mariano_x, mariano_y: position of Mariano
  • stepsfile.txt: route of the steps file

Barcenas and Mariano are in a map of worldDimension x worldDimension. The goal of the problem is to find Barcenas. Barcenas smells at his position and in the adjacent ones in a cross. Our Agent moves around the map trying to find Barcenas. Our Agent can smell Barcenas if he is in Barcenas range of smell. Our Agent can meet with Mariano if he steps in the same position of the map. Mariano will tell to our Agent if Barcenas is at his right or at his left (If it is in the same column he will say right).

stepsfile.txt

stepsfile.txtis a flat text document with the steps our agent will do with the following format.

    x1,y1 x2,y2 ... xl,yl

Being l = worldDimension . Our Agent will just do the steps of the file by order. The steps don't need to be adjacent, you can jump from position to position.

Example

Execute the following commands if you have the right $CLASSPATH with both Jade and SAT4J .jar.

Create the list of steps.

$ echo "1,1 1,2 2,2 2,3 3,3 4,3 4,4 4,5 5,5" > steps.txt

Execute the agents.

$ java jade.Boot -agents 'BarcenasWorld:BarcenasWorldEnv(6,4,4,2,2);Finder:BarcenasFinder(BarcenasWorld,6,steps.txt)'

At 2,2 the finder agent should meet with Mariano and discard the first column as he says that barcenas is at his right. The program should stop by the 4,4 step where the finder has enough evidence that Barcenas is in 4,4.

Authors

About

Propositional Logic Agents with the JADE platform and SAT4J

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages