Skip to content

Donovan700/Jean-Rob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-Agent Simulation: Robot, Key, and Door

Description

This project demonstrates a multi-agent simulation (MAS) where a robot navigates a grid to pick up a key and reach a door located at the edges.

Two types of agents are implemented:

  • Reactive Agent: Moves randomly, explores the grid, collects the key, and searches for the door along the edges to open it.
  • Cognitive Agent: Plans its path intelligently, first moving towards the key and then directly to the door.

The project is written in C++ and uses object-oriented programming (OOP) principles to model the robot, key, and door, as well as the agents’ behavior.


  • POO/: Contains the main entities (Robot, Porte, Cle) with their methods and states.
  • POA/: Contains agent implementations.
  • main.cpp: Initializes the grid, sets up agents, and runs the simulation with terminal output.

Features

  • Configurable grid size (currently 10x6).
  • Terminal grid visualization:
    • R : Robot
    • K : Key (if not collected)
    • D : Closed Door
    • O : Open Door
    • . : Empty cell
  • Reactive Agent: random exploration, key collection, and edge search for the door.
  • Cognitive Agent: path planning towards key and then to the door.
  • Prevents initial position conflicts (robot, key, and door start in different cells).
  • Animation of robot movement with delays for visualization.

How to Run

  1. Clone the repository:
git clone <PROJECT_URL>
cd SMA-Robot-Door
  1. Compile the project:
g++ main.cpp POO/*.cpp POA/*.cpp -o simulation -std=c++17
  1. Run the simulation:
./simulation

Concepts Demonstrated

  • Multi-Agent Systems (MAS) : reactive vs cognitive agents

  • Object-Oriented Programming (OOP) in C++

  • Grid exploration and pathfinding

  • Randomized vs planned behavior

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors