Repository with console python implementation of Simple Artificial Life (simplified MAS) and Conway's game of life

Overview

artificial-life-game

Repository with console python implementation of Simple Artificial Life (simplified MAS) and Conway's game of life

Installation

conda create --name <env_name> --file requirements.txt
conda activate <env_name>

Conways Game of Life

See WIKI for detailes abot Conway's Life: https://conwaylife.com/wiki/Gosper_glider_gun 3 Initial State Animations implemented:
1 - Randomly turned cells
python conwayGameOfLife.py
2 - Glider
python conwayGameOfLife.py --grid-size 32 --interval 500 --glider
3 - Gosper
python conwayGameOfLife.py --interval 500 --gosper

Simple Life Realization

Details and Rules

Terms: Field, Cell, Agent

Artificial Life Example

Agent - acting model. Has Physical and Mental health.
Can make 3 actions: Move, Split, Eat

  • Each Move decrements Mental Health (by 1). Mental Health Is not renewable. Moves can be made on 4 directions: up, down, left, right.
  • Each Eat action increase Physical Health . (Eat till MAX_PHYSICAL_HEALTH reached). Per Game tick it 1 food form Cell.
  • Agent make Split when Physical Health > 0.8 * MAX_PHYSICAL_HEALTH (A MUST). It decrements Physical Health with value 0.8 * MAX_PHYSICAL_HEALTH . 0.8 is a split coefficient - can be controlled in ./helpers/consts.py

Cell - each cell of field. Has food generated randomly

  • Stores food value
  • Bordered with MAX FOOD value - can be controlled in ./helpers/consts.py
  • Color of Cell. If has food - 255 (yellow), of don't have - 0 (purple)

Field - 2dim Cells array

  • Should be renewable : per tick 2 foody cells creates randomly (this value can be changed)

Deafault sconditions

MAX_FOOD_IN_CELL = 5       	# Max food value in cell
FOOD_COLOR_MAP = {
    0: 0,
    1: 51,
    2: 102,
    3: 153,
    4: 204,
    5: 255
}							# Color gradient depends on food quantity in cell
INITIAL_AGENTS_COUNT = 1	# 1 agent creates when simulation starts
PART_OF_CELLS_WITH_FOOD = 0.1 * N * N   #  only 0.1 of total cells are with food initialt
INITIAL_AGENTS_COUNT = 1
MAX_MENTAL_HEALTH = 15
MAX_PHISICAL_HEALTH = 30
SPLIT_COEFFICIENT_PHISICAL = 0.8
DECREMENT_PHISICAL_HEALTH = 0.8 * MAX_PHISICAL_HEALTH   # when split
DECREMENT_MENTAL_HEALTH = 1     # when move
UPDATE_INTERVAL = 1000
MAX_AGENTS_COUNT = 8
MAX_DEAD_TICKS = 3 
Owner
Vladislav
Software Enabling Engineer
Vladislav
Simple Game created using Python & PyGame, as my Beginner Python Project!

Space Invaders This is a simple SPACE INVADER game create using PYGAME whihc have sound and lot's of keyboard functions. Prerequisites More Experience

Gaurav Pandey 2 Jan 08, 2022
A small module for creating a card deck, used for making card games

card-deck This module can be used to create small card games such as BlackJack etc.. To initialize the deck, use: Deck() To shuffle the deck, use: Dec

4 Dec 31, 2021
Experimental Brawl Stars v37.222 server emulator written in Python.

Brawl Stars v37 Experimental Brawl Stars v37.222 server emulator written in Python. Requirements: Python 3.7 or higher colorama Running the server In

13 Oct 08, 2021
This is an amazing game make using pygame.

This is an awesome balloon game. It is made in python using Pygame library. It is a project game while learning game development.

Rishikesh Kumar 2 Oct 10, 2021
A small fun project to simulate Conway's Game of Life, created in Python.

A small fun project to simulate Conway's Game of Life, created in Python. Conway's Game of Life simulates a grid of cells, where the state of each cell consists of whether the cell is alive or dead.

Harrison Verrios 1 Jun 19, 2022
SpiderArcadeGame - A game where the player controls a little spider who is trying to protect herself from other invasive bugs

SpiderArcadeGame - A game where the player controls a little spider who is trying to protect herself from other invasive bugs

Matheus Farias de Oliveira Matsumoto 1 Mar 17, 2022
Chess Game using Python

Chess Game is a single-player game where the objective is same as the original chess game. You just need to place your chess piece in a correct position. The purpose of the system is to provide some

Yogesh Selvarajan 1 Aug 15, 2022
BUBBLE SHOOT - Pygame (python)

BUBBLE-SHOOT---Pygame BUBBLE SHOOT - Pygame (python) Bubbleshooter This is a Bubble shooter Game made with pygame. The arrow is controlled by the arro

ROBIN JONEY 1 Nov 12, 2021
An open-world game made in Python.

Dragon Realms Notes Windows OS only Contributors This project follows the all-contributors specification (emoji key, command Issue). See what you can

Dragon Realms 2 Jul 28, 2022
Code d'un jeu en python par Graveen (avec mes modifications)

ATTENTION Vous ne devez pas copier coller le code sans le comprendre, apprennez déjà, le python et pygame, et seulement ensuite, vous pourrrez l'utili

TheBigWolfy 7 Nov 02, 2022
The original Tetris tile-matching game as adopted by IBM PC.

🕹️ Tetris Game The original Tetris tile-matching game as adopted by IBM PC. Game developed purely on python using the Dear PyGui Framework. 📖 Instru

14 Nov 12, 2022
游戏中按TAB键查看所有玩家分数的小程序

DDNet-show-points-in-game DDRaceNetwork 游戏中按TAB键查看所有玩家分数的小程序

3 Oct 13, 2022
A basic quiz game using Python

QuizGame A basic quiz game using Python Passwords for quizzes (NO CAPS LOCK!): -ryzermattishandsome -canisleepwithyou Before using this, please make s

Austin 1 Nov 12, 2021
Snake game made in python with the pygame library.

Pygame snake Snake game made in python with the pygame library. Requirements pip pygame Pygame Installation On the command line, type: pip install pyg

Ayza 3 Oct 02, 2022
Pong is one of the first computer games that ever created, this simple

Pong-Game Pong is one of the first computer games that ever created, this simple "tennis like" game features two paddles and a ball, the goal is to de

Lateefah Ajadi 0 Jan 15, 2022
Wordle is a word game reminiscent of mastermind

Wordle is a word game reminiscent of mastermind. The player tries to guess a five letter word within six attempts. After each attempt, hints are given. Green tiles show that the letter is in the righ

Sidharth Anand 1 Feb 09, 2022
Blackjack Game made using Python

Blackjack Game made using Python Blackjack is a popular card game played in most of the casino.This is an intuition to replicate the same card game us

SUHASJAGADISH 1 Nov 28, 2021
Just a copied of flappy bird game made by Thuongton999

flappy-bird Just a copied of flappy bird game made by Thuongton999 Installation and Usage Using terminal (on Window) Make sure you installed Python an

ThuongTon 9 Aug 08, 2021
Gamelib is a pure-Python single-file library/framework for writing simple games.

Gamelib is a pure-Python single-file library/framework for writing simple games. It is intended for educational purposes (e.g. to be used in b

Diego Essaya 15 Dec 22, 2022
Repository for the DecodED2 Game Project!

DecodED2 Game Project Hello everyone! Welcome to the GitHub Repository for DecodED2, as a start you'll need to clone this repository and make sure you

6 Sep 29, 2021