Code Monkey home page Code Monkey logo

py-2048's Introduction

py-2048

Program is simulating playing of game 2048. There are available 3 strategies.

Random

At each turn is choosen one random side to slide.

Simple

If there are two number in row or column that can be connected this turn will be used. If there arent any random turn is used instead.

Stragery thinking few turns ahead

This strategy calculates score for each possible turn, best turn will be used. Because this strategy checks few steps to future, it is able to connect some numbers even in few turns.

Usage

python 2048.py -h

Test of random and simple strategy, 10 games python 2048.py -s -t 10

Test of multiple levels of prediction python 2048.py -l -t 3

py-2048

Program simuluje hranie hry 2048. Dostupné sú 3 stratégie. Každá stratégia dosahuje lepšie výsledky ako predchádzajuca.

Náhodná

Na každom ťahu sa vyberie náhodný smer.

Jednoduchá

Ak sa daju spojiť dva čísla v riadku alebo stĺpci, tak sa spoja. Ak nieje žiaden takýto prípad, vykoná sa náhodný ťah.

Ktorá skúša niekoľko ťahov dopredu

Táto stratégia spočíta koľko bodov získa ktorým ťahom. Ale stratégia takto skúša niekoľko ťahov dopredu, takže je schopná odhadnúť ako sa dajú čísla spojiť aj pomocou niekoľkych ťahov.

Použitie

python 2048.py -h

Otestovanie náhodnej a jednoduchej stratégie, 10 hier python 2048.py -s -t 10

Test rôzných úrovni predvídania ťahov python 2048.py -l -t 3

py-2048's People

Contributors

dee-gmiterko avatar

Watchers

James Cloos 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.