diff --git a/OOP_D9_Project/Rules b/OOP_D9_Project/Rules new file mode 100644 index 0000000..a4826dd --- /dev/null +++ b/OOP_D9_Project/Rules @@ -0,0 +1,44 @@ +### Description of the Rules for the Multi-Agent Simulation Game + +The Multi-Agent Simulation game is based on the famous "Game of Life" by John Conway, and it has been extended to include additional agents and rules to create a more complex and dynamic environment. Here is a brief description of the rules governing the game: + +#### Conway's Game of Life Rules +1. **Grid-Based World**: The world is represented as a grid of cells where each cell can be either alive (1) or dead (0). +2. **Neighbor Counting**: Each cell interacts with its eight neighbors (horizontal, vertical, and diagonal). +3. **Rules of Evolution**: + - **Underpopulation**: A living cell with fewer than two live neighbors dies. + - **Survival**: A living cell with two or three live neighbors lives on to the next generation. + - **Overpopulation**: A living cell with more than three live neighbors dies. + - **Reproduction**: A dead cell with exactly three live neighbors becomes a living cell. + +#### Extensions with Agents +In addition to the basic cells, the simulation includes agents such as herbivores and predators that introduce new behaviors and interactions: + +1. **Herbivores (formerly Sheep)**: + - **Movement**: Herbivores move randomly within the grid. + - **Hunger**: Herbivores have a hunger level that increases over time. If they do not find food (cells they can consume), they eventually die of hunger. + - **Reproduction**: Under certain conditions, herbivores can reproduce if they meet specific criteria (e.g., proximity to another herbivore). + +2. **Predators (formerly Wolves)**: + - **Movement**: Predators also move randomly but are more likely to move towards herbivores. + - **Hunting**: Predators hunt herbivores. When a predator encounters a herbivore, it consumes the herbivore, resetting its hunger level. + - **Hunger**: Like herbivores, predators have a hunger level that increases over time. If they do not find food (herbivores to eat), they eventually die of hunger. + +#### Grid Boundaries +The grid can have two types of boundary conditions: +1. **Closed Border**: Cells on the edge of the grid have fewer neighbors (cells beyond the grid are considered dead). +2. **Looping Border**: The grid wraps around, meaning the edge cells consider the opposite edge cells as neighbors, creating a continuous loop. + +#### Custom Rules +Players can define custom rules for cell birth and survival: +- **Survival Rules**: Specify the number of neighbors required for a cell to survive. +- **Birth Rules**: Specify the number of neighbors required for a dead cell to become alive. + +#### Interaction with the Simulation +Players can interact with the simulation using a graphical user interface (GUI) to: +- **Toggle Cells**: Click on cells to toggle their state (alive/dead). +- **Add Agents**: Place herbivores and predators at specified locations. +- **Control Simulation**: Start, pause, and stop the simulation, and adjust the speed of the simulation. + +This dynamic environment creates a complex and evolving simulation where players can observe patterns, emergent behaviors, and the interactions between different types of agents and cells. + diff --git a/OOP_D9_Project/examples/BlobRule.csv b/OOP_D9_Project/examples/BlobRule.csv new file mode 100644 index 0000000..51c9e8e --- /dev/null +++ b/OOP_D9_Project/examples/BlobRule.csv @@ -0,0 +1,2 @@ +1;3;5;8 +3;5;7; diff --git a/OOP_D9_Project/examples/Saved rules b/OOP_D9_Project/examples/Saved rules new file mode 100644 index 0000000..1d93ca8 --- /dev/null +++ b/OOP_D9_Project/examples/Saved rules @@ -0,0 +1,2 @@ +[1, 3, 5, 8] +[3, 5, 7] diff --git a/OOP_D9_Project/examples/flock.csv b/OOP_D9_Project/examples/flock.csv new file mode 100644 index 0000000..e16d890 --- /dev/null +++ b/OOP_D9_Project/examples/flock.csv @@ -0,0 +1 @@ +10,10;11,11;9,11;12,10 diff --git a/OOP_D9_Project/examples/glider.csv b/OOP_D9_Project/examples/glider.csv new file mode 100644 index 0000000..86e6cb4 --- /dev/null +++ b/OOP_D9_Project/examples/glider.csv @@ -0,0 +1,100 @@ +0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0; +0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0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;0;1;1;0;0;0;0;0; diff --git a/OOP_D9_Project/src/.gitignore b/OOP_D9_Project/src/.gitignore new file mode 100644 index 0000000..7112305 --- /dev/null +++ b/OOP_D9_Project/src/.gitignore @@ -0,0 +1,2 @@ +/Main.class +/testgit.class diff --git a/OOP_D9_Project/src/backend/.gitignore b/OOP_D9_Project/src/backend/.gitignore new file mode 100644 index 0000000..f12f5b1 --- /dev/null +++ b/OOP_D9_Project/src/backend/.gitignore @@ -0,0 +1,3 @@ +/Agent.class +/Sheep.class +/Simulator.class diff --git a/OOP_D9_Project/src/backend/Herbivore.java b/OOP_D9_Project/src/backend/Herbivore.java new file mode 100644 index 0000000..22877ce --- /dev/null +++ b/OOP_D9_Project/src/backend/Herbivore.java @@ -0,0 +1,25 @@ +package backend; + +import java.awt.Color; +import java.util.ArrayList; +import java.util.Random; + +public class Herbivore extends Agent { + int hungerLevel; + Random randomGen; + + public Herbivore(int x, int y) { + super(x, y, Color.white); + hungerLevel = 0; + randomGen = new Random(); + } + + @Override + public boolean performAction(ArrayList neighbors, Simulator world) { + // Herbivore moves randomly + posX += randomGen.nextInt(3) - 1; + posY += randomGen.nextInt(3) - 1; + hungerLevel++; + return hungerLevel < 20; // Herbivore dies if it reaches maximum hunger + } +} diff --git a/OOP_D9_Project/src/backend/Matrix.java b/OOP_D9_Project/src/backend/Matrix.java new file mode 100644 index 0000000..351f933 --- /dev/null +++ b/OOP_D9_Project/src/backend/Matrix.java @@ -0,0 +1,91 @@ +package backend; + +import java.util.ArrayList; + +public class Matrix { + private int[][] matrixCells; + private int matrixWidth; + private int matrixHeight; + + public Matrix(int width, int height) { + this.matrixWidth = width; + this.matrixHeight = height; + this.matrixCells = new int[width][height]; + } + + public int getWidth() { + return matrixWidth; + } + + public int getHeight() { + return matrixHeight; + } + + public int getCell(int x, int y) { + return matrixCells[x][y]; + } + + public void setCell(int x, int y, int value) { + matrixCells[x][y] = value; + } + + public void toggleCell(int x, int y) { + matrixCells[x][y] = (matrixCells[x][y] == 0) ? 1 : 0; + } + + public ArrayList saveState() { + ArrayList state = new ArrayList<>(); + for (int x = 0; x < matrixWidth; x++) { + StringBuilder row = new StringBuilder(); + for (int y = 0; y < matrixHeight; y++) { + row.append(matrixCells[x][y]).append(";"); + } + state.add(row.toString()); + } + return state; + } + + public void loadState(ArrayList lines) { + for (int x = 0; x < lines.size(); x++) { + String[] values = lines.get(x).split(";"); + for (int y = 0; y < values.length; y++) { + matrixCells[x][y] = Integer.parseInt(values[y]); + } + } + } + + public void updateCells(ArrayList surviveRules, ArrayList birthRules, boolean loopingBorder) { + int[][] newCells = new int[matrixWidth][matrixHeight]; + for (int x = 0; x < matrixWidth; x++) { + for (int y = 0; y < matrixHeight; y++) { + int neighbors = countNeighbors(x, y, loopingBorder); + if (matrixCells[x][y] == 1) { + newCells[x][y] = (surviveRules.contains(neighbors)) ? 1 : 0; + } else { + newCells[x][y] = (birthRules.contains(neighbors)) ? 1 : 0; + } + } + } + matrixCells = newCells; + } + + private int countNeighbors(int x, int y, boolean loopingBorder) { + int count = 0; + for (int i = -1; i <= 1; i++) { + for (int j = -1; j <= 1; j++) { + if (i == 0 && j == 0) + continue; + int nx = x + i; + int ny = y + j; + if (loopingBorder) { + nx = (nx + matrixWidth) % matrixWidth; + ny = (ny + matrixHeight) % matrixHeight; + } + if (nx >= 0 && nx < matrixWidth && ny >= 0 && ny < matrixHeight) { + count += matrixCells[nx][ny]; + } + } + } + return count; + } +} diff --git a/OOP_D9_Project/src/backend/Predator.java b/OOP_D9_Project/src/backend/Predator.java new file mode 100644 index 0000000..10dba4e --- /dev/null +++ b/OOP_D9_Project/src/backend/Predator.java @@ -0,0 +1,31 @@ +package backend; + +import java.awt.Color; +import java.util.ArrayList; +import java.util.Random; + +public class Predator extends Agent { + int hungerLevel; + Random randomGen; + + public Predator(int x, int y) { + super(x, y, Color.gray); + hungerLevel = 0; + randomGen = new Random(); + } + + @Override + public boolean performAction(ArrayList neighbors, Simulator world) { + for (Agent neighbor : neighbors) { + if (neighbor instanceof Herbivore) { + hungerLevel = 0; // Reset hunger after eating + return true; // Predator survives by eating herbivore + } + } + // Move randomly + posX += randomGen.nextInt(3) - 1; + posY += randomGen.nextInt(3) - 1; + hungerLevel++; + return hungerLevel < 10; // Predator dies if it starves + } +} diff --git a/OOP_D9_Project/src/backend/Sheep.java b/OOP_D9_Project/src/backend/Sheep.java deleted file mode 100644 index ece8a18..0000000 --- a/OOP_D9_Project/src/backend/Sheep.java +++ /dev/null @@ -1,59 +0,0 @@ -package backend; - -import java.awt.Color; -import java.util.ArrayList; -import java.util.Random; - -// example of basic animal. -// do not hesitate to make it more complex -// and DO add at least another species that interact with it -// for example wolves that eat Sheep -public class Sheep extends Agent { - - int hunger; - Random rand; - - Sheep(int x,int y){ - //first we call the constructor of the superClass(Animal) - //with the values we want. - // here we decide that a Sheep is initially white using this constructor - super(x,y,Color.white); - // we give our sheep a hunger value of zero at birth - hunger = 0; - //we initialize the random number generator we will use to move randomly - rand = new Random(); - } - - /** - * action of the animal - * it can interact with the cells or with other animals - * as you wish - */ - public boolean liveTurn(ArrayList neighbors, Simulator world) { - if(world.getCell(x, y)==1) { - world.setCell(x, y, 0); - } else { - hunger++; - } - this.moveRandom(); - return hunger>10; - } - - private void moveRandom() { - int direction = rand.nextInt(4); - if(direction == 0) { - x+=1; - } - if(direction == 1) { - y+=1; - } - if(direction == 2) { - x-=1; - } - if(direction == 3) { - y-=1; - } - } - - -} diff --git a/OOP_D9_Project/src/backend/World.class b/OOP_D9_Project/src/backend/World.class new file mode 100644 index 0000000..6922c37 Binary files /dev/null and b/OOP_D9_Project/src/backend/World.class differ diff --git a/OOP_D9_Project/src/backend/World.java b/OOP_D9_Project/src/backend/World.java new file mode 100644 index 0000000..671886e --- /dev/null +++ b/OOP_D9_Project/src/backend/World.java @@ -0,0 +1,47 @@ +package backend; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Set; + +public class World { + private Matrix matrix; + private Set entities; + + public World(int width, int height) { + this.matrix = new Matrix(width, height); + this.entities = new HashSet<>(); + } + + public Matrix getGrid() { + return matrix; + } + + public Set getEntities() { + return entities; + } + + public void addAgent(Agent Agent) { + entities.add(Agent); + } + + public void removeAgent(Agent Agent) { + entities.remove(Agent); + } + + public void updateGrid(ArrayList surviveRules, ArrayList birthRules, boolean loopingBorder) { + matrix.updateCells(surviveRules, birthRules, loopingBorder); + } + + + public Set processAgentTurns(Simulator simulator) { + Set survivingEntities = new HashSet<>(); + for (Agent agent : entities) { + if (agent.performAction(simulator.getNeighbors(agent), simulator)) { + survivingEntities.add(agent); + } + } + entities = survivingEntities; + return entities; + } +} diff --git a/OOP_D9_Project/src/windowInterface/.gitignore b/OOP_D9_Project/src/windowInterface/.gitignore new file mode 100644 index 0000000..03054a7 --- /dev/null +++ b/OOP_D9_Project/src/windowInterface/.gitignore @@ -0,0 +1,15 @@ +/JPanelDraw$1.class +/JPanelDraw.class +/Main.class +/MyInterface$1.class +/MyInterface$10.class +/MyInterface$11.class +/MyInterface$2.class +/MyInterface$3.class +/MyInterface$4.class +/MyInterface$5.class +/MyInterface$6.class +/MyInterface$7.class +/MyInterface$8.class +/MyInterface$9.class +/MyInterface.class