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
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
Flappy Bird hack using Deep Reinforcement Learning (Deep Q-learning).

Using Deep Q-Network to Learn How To Play Flappy Bird 7 mins version: DQN for flappy bird Overview This project follows the description of the Deep Q

Yen-Chen Lin 6.4k Dec 30, 2022
狼人杀,线下面杀用,服务端语音播报,浏览器操作,移动端友好。不再需要真人法官~

Wolf 狼人杀面杀法官系统 Preview 如何使用 安装 Python 3.5.2 版本及以上(PyWebIO 要求) pip install -r requirements.txt python main.py 所有玩家访问 Web 服务 TODO,欢迎PR TTS 目前仅支持 macOS 未

Lake Chan 33 Nov 11, 2022
Running Chess Night results tabulation

Running Chess Night results tabulation

Mitch LeBlanc 2 Nov 20, 2021
OpenGL experiments with Pygame & ModernGL

pygame-opengl OpenGL experiments with Pygame & ModernGL TODO Skybox & Reflections Post-process effects (motion blur, color correction, etc..) Normal m

Kadir Aksoy 4 Oct 28, 2022
Pyxel is a retro game engine for Python.

Pyxel is open source and free to use. Let's start making a retro game with Pyxel!

Takashi Kitao 11.2k Jan 09, 2023
A terminal-based number guessing game written in python

A terminal-based number guessing game written in python

Akshay Vs 15 Sep 22, 2022
This is a python interactive story game that I made to show off what I've learnt in python coding for a month

Purpose The files in this repository are for that of a story game created with python version 3.8.5 The purpose of this project was to get familiar wi

0 Dec 30, 2021
Turtle Road Crossing Game in Turtle(python module)

Turtle Road Crossing Game in Turtle(python module) In this project we have built a road crossin game in python with Object-Oriebted Programming. This

Jhenil Parihar 3 Jun 15, 2022
Jogo da velha escrito em python para 1 ou 2 jogadores

O Jogo da Velha Esse jogo da velha foi desenvolvido por mim em python, como um desafio de programar um jogo da velha em menos de 24 horas, no qual o c

Gabriel Castelo Branco 5 Jun 18, 2021
MCTS (among other things) for 2048

2048 Created by Chad Palmer for CPSC 474, Fall 2021 Overview: This is an application which can play 2048 and simulate games of 2048 with a variety of

Chad Palmer 1 Dec 16, 2021
16-bit PvP platform minigame made for a final high-school project

16-bit PvP platform minigame made for a final high-school project

Flavien 1 Feb 10, 2022
Building a Mario-like, classic platformer game in Python using the PyGame Library

Building a Mario-like, classic platformer game in Python using the PyGame Library

Clarence Vinzcent Reyes 1 Feb 06, 2022
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
My first Minecraft CPU. Created in collaboration with Peer Carnes as a final project in CS 281: Architecture and Assembly at the University of Puget Sound

Minecraft CPU This is my first ever Minecraft CPU, created in collaboration with Peer Carnes. We created a custom assembly language, including an asse

Andy Chamberlain 4 Oct 10, 2022
Box - a world simulator written in python with pygame

Box is a world simulator written in python with pygame. Features A world generation system A world editor Simulates creatures called boxlanders. You c

1up Community 3 Nov 14, 2022
Wordle - Implementation of wordle and a solver

Wordle - Implementation of wordle and a solver

Kurt Neufeld 1 Feb 04, 2022
Disables the chat in League of Legends for Windows.

Disables the chat in League of Legends for Windows. If you simply can't stop yourself from typing LeagueStop will play KEKW.mp3 each time you try. The sound will stack & becomes horribly annoying.

1 Nov 24, 2021
The Sinclair ZX Spectrum BASIC compiler!

ZX BASIC Copyleft (K) 2008, Jose Rodriguez-Rosa (a.k.a. Boriel) http://www.boriel.com All files in this project are covered under the GPLv3 LICENSE ex

Jose Rodriguez 143 Dec 13, 2022
Python desktop application to create, distribute, discover, and run codegames

Python desktop application to create, distribute, discover, and run codegames

2 Nov 16, 2021