Giter Site home page Giter Site logo

peteprattis / chromosome-last-nucleotide-game Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 24 KB

A Python script that implements a two player strategic game with two chromosomes having length n and m of nucleotides respectively. In each Round of the game a player can destroy one of the chromosomes and split the other into two non-empty parts. The player who deletes the last nucleotide wins.

License: MIT License

Python 100.00%
python bioinformatics fasta chromosomes nucleotides arrays loop game student computer-science

chromosome-last-nucleotide-game's Introduction

A Python Program / Project

This is a Python project from my early days as a Computer Science student

This programm was created for the sixth semester class Bioinformatics and is one of the final projects for the class

Description of project

A Python script that implements a two player strategic game with two chromosomes having length n and m of nucleotides respectively. In each Round of the game a player can destroy one of the chromosomes and split the other into two non-empty parts. The player who deletes the last nucleotide wins.

Strategy explanation

In this exercise we used homo sapiens chromosome 14 and homo sapiens chromosome 11. The first chromosome has a length of 39,314 and the second has a length of 14,327. The player who reaches the length of the 2 chromosomes in chromosome 1 = length 1 and chromosome 2 = length 2 should delete chromosome 1 with length 1 to reach chromosome 1 = length 1 and chromosome 2 = length 1. So we leave no choice to the other player and as a result we win winners. Initially, we enter our data from the NCBI database, and then we define the player with 0 which equals player 1. Assuming that the terminal condition is for the player to be -1, we enter the main loop. There, we define the variable choice, according to which the player chooses which chromosome he wishes to delete. The first condition we come across is one where the player must be 1 in order for the player to be valid and in addition the chromosome in each chromosome is not 0 or 1 in length.

About this project

  • The comments to make the code understandable, are within the .py archive
  • This project was written in IDLE, Python’s Integrated Development and Learning Environment.
  • Biological data used from https://www.ncbi.nlm.nih.gov/gene/ (genes 5836, 5837)
  • This program runs for Python version 2.7
  • This repository was created to show the variety of the work I did and experience I gained as a student

chromosome-last-nucleotide-game's People

Contributors

peteprattis avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.