Giter Club home page Giter Club logo

jainsid24 / life-odyssey Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 36.2 MB

Life Odyssey is an interactive cellular automata simulation that allows users to experiment with various rules and initial conditions to see how cells evolve over time. With the added Zombie Mode, cells can infect and transform into zombies, adding a new level of complexity and challenge to the game. Open source under MIT License

Home Page: https://jainsid24.github.io/life-odyssey

Python 100.00%
cellular-automata gameoflife

life-odyssey's Introduction

Life Odyssey

License: MIT Commit Activity Repo Size Python Version Pygame Version Code style: black

Life Odyssey explores the emergent behaviors of cellular automata. The program allows users to experiment with various rules and initial conditions to see how these affect the growth and evolution of cells on a grid. With the added "zombie mode," players can watch as cells can infect and transform into zombies, adding a new level of complexity and challenge. Life Odyssey offers a visually immersive and engaging experience that is perfect for students, researchers, or anyone interested in the study of complex systems.


Gameplay Zombie Mode Draw Mode

Gameplay | Zombie Mode | Draw Mode

Table of Contents

  1. Introduction
  2. Features
  3. Installation
  4. Usage
  5. Code Documentation
  6. References
  7. License

Introduction

Cellular Automata is an intriguing concept that involves discrete mathematical models used for modeling and simulating complex systems. It has been used to simulate and model various phenomena across several fields, including physics, biology, and engineering. In recent years, it has gained popularity in computer science and artificial intelligence for simulating complex systems, developing machine learning algorithms, and solving optimization problems. One of the most popular Cellular Automata applications is Conway's Game of Life, which simulates the evolution of a colony of cells and demonstrates the emergence of complex patterns and behaviors.

In this work, a modified version of Conway's Game of Life called Life Odyssey is presented, which adds an exciting new twist to the game. In addition to the standard evolution rules, a zombie infection mode has been added, where the live cells can become zombies and infect their neighboring cells. This unique feature adds a new level of complexity and dynamics to the game, where players can observe the spread of the infection and the resulting patterns and behaviors. Life Odyssey has been implemented using Python and Pygame, which provides a visually appealing and interactive environment for the players. The game has several customization options, including the ability to create and edit patterns, adjust the speed and size of the game, and activate the zombie mode.

Life Odyssey can serve as an educational tool for learning cellular automata, and also as an entertaining game for casual players. It can also be used as a research tool for investigating complex systems and phenomena, such as the spread of diseases and the dynamics of social networks.

Features

  • Zombie Infection Mode : In addition to the standard evolution rules, live cells can become zombies and infect their neighboring cells, adding a new level of complexity and dynamics to the game.
  • Customizable Patterns : Players can create and edit patterns using the drawing tool, and use them to explore and observe the dynamics of the game.
  • Adjustable Game Settings : Life Odyssey provides several customization options, including the ability to adjust the speed and size of the game, and activate the zombie mode.
  • Pulsating Color Scheme : The game uses a pulsating color scheme that provides a visually appealing and dynamic experience for the players.
  • Educational Tool : Life Odyssey can serve as an educational tool for learning about cellular automata and complex systems.
  • Research Tool : Life Odyssey can also be used as a research tool for investigating complex phenomena, such as the spread of diseases and the dynamics of social networks.

Installation

  • Clone the repository:
git clone https://github.com/username/repository.git
  • Install the required dependencies:
pip install -r requirements.txt

Usage

To run the program, navigate to the root directory of the project and run the following command:

python game.py

The Pygame window will open and the game will start. The program can be stopped by closing the window or pressing Ctrl-C in the terminal.

Key Bindings

  • SPACE - clear the grid
  • RETURN - pause/play the game
  • g - generate a random glider pattern
  • Left Mouse Button - start drawing on the grid (when the game is paused)
  • Left Mouse Button Release - stop drawing on the grid (when the game is paused)

Configuration

The game can be customized by modifying the following parameters in the config.py file:

  1. ROWS - the number of rows in the grid
  2. COLS - the number of columns in the grid
  3. CELL_SIZE - the size of each cell in pixels
  4. FPS - the frame rate of the game
  5. INFECT_PROBABILITY - the probability of a live cell turning into a zombie (if the zombie mode is enabled)
  6. FLIP - the maximum number of cells that can be randomly flipped in one step (if the zombie mode is enabled)
  7. SCALE_FACTOR - the maximum scale factor for the pulsating effect
  8. ZOMBIE - enable or disable the zombie mode (True or False)
  9. The game also supports customization of the color scheme used for drawing the grid. This can be done by modifying the color_scheme dictionary in the config.py file. The dictionary contains three keys: DEAD_COLOR, LIVE_COLOR, and ZOMBIE_COLOR, each representing the RGB values of the corresponding color. The colors can be modified by changing the RGB values to the desired values.

Code Documentation

Documentation

References

License

This code is licensed under the MIT License.

Want to Contribute?

Check out CONTRIBUTING.md.

life-odyssey's People

Contributors

jainsid24 avatar

Stargazers

Prathma Rastogi avatar

Watchers

Kostas Georgiou avatar  avatar

Forkers

github-prathma

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.