From 0868ccd1f1e092d041120fa7eb9b6782dac8e711 Mon Sep 17 00:00:00 2001 From: virgi Date: Fri, 31 May 2024 11:21:08 +0200 Subject: [PATCH] git add readme and flock --- OOP_D7_Project/Agents/flock.csv | 2 +- OOP_D7_Project/Readme | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 OOP_D7_Project/Readme diff --git a/OOP_D7_Project/Agents/flock.csv b/OOP_D7_Project/Agents/flock.csv index 4c685d8..b3bf9f6 100644 --- a/OOP_D7_Project/Agents/flock.csv +++ b/OOP_D7_Project/Agents/flock.csv @@ -1 +1 @@ -10,10;11,11;9,11;12,10 \ No newline at end of file +10,11;11,11;9,11;12,11 diff --git a/OOP_D7_Project/Readme b/OOP_D7_Project/Readme new file mode 100644 index 0000000..53c5ad5 --- /dev/null +++ b/OOP_D7_Project/Readme @@ -0,0 +1,16 @@ +The goal of this project is to link a multi-agent simulation and the Game of life of Conway. + +In our code we have 3 differents rules : +- The Conway rules that state that any living cells with 1 or more than 3 neighbors dies and a dead cell with exactly 3 living neighbors will come to life. +- The Blob Rule stating that a cell will stay alive if she has exactly 1,3,5,8 neighbors and a dead cell with exaclty 3,5,7 living neighbors will come to life. +- Our rule stating that any living cell with 2 and 4 neighbors dies and a dead cell will come to life if she has 1 or 3 living neighbors + +Part 3 +To be able to save a world we needed to create a snapshot of the grid where each line is represented as a string of the +cell state separated by semicolons. +To do that we first create an empty list, and then the state of every cell of the grid is stored inside this list. +To save an agent or a rule do the same methodology. + +Agent +We implemented the sheep agent and the engineer agent +To implement the \ No newline at end of file