njoppi2 / multi-agent-miners

πŸ€– πŸ‘₯ A multi-agent mining project made with Jason

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multi-agent-miners

g1

A multi-agent mining implementation using Jason, made by me and @IgorMayWensing for a project of the INE5430 artificial intelligence discipline. For information about Jason, take a look at their official documentation website.

πŸ› οΈ Functionalities implemented

  • When a robot finds a resource, it notifies all robots, so they all mine the resource found.
  • When a robot notices the current resource is no longer available, it notifies the other robots.
  • While searching for a yellow resource, the robots also keep track of green and blue resources they find.
  • After they collaborated mining a resource, each robot goes back to their previous location.
  • Robots always mine the found resources closest to the builder (white square).

πŸ”Ž How it works

We created a flowchart to reduce the number of possible flows helping in the planning of our program, and thus making the code more simple.

g2

The flowchart used is the one in the figure above, with which we were able to make the code easier to develop and modify. When an agent finds a resource needed, it notifies everyone, including himself, through the belief group_found(R, X, Y, Max). Then executes !check_for_resources, as there is now this new belief, the agent itself who found the resource will enter it, as well as the others who received group_found(R, X, Y, Max) via the tell. Making the same flow of call to the one who called and to the one who was called. We also made possible to prioritize the resource closest to the boss, using the "Max" in group_found(R, X, Y, Max), created using the .max function:

.max([((X-15)\*\*2)\*\*(1/2),((Y-15)\*\*2)\*\*(1/2)], Max).

About

πŸ€– πŸ‘₯ A multi-agent mining project made with Jason

License:GNU Lesser General Public License v3.0


Languages

Language:Java 57.2%Language:HTML 40.9%Language:XSLT 1.4%Language:ASL 0.4%Language:Shell 0.1%Language:Ruby 0.0%