Git Product home page Git Product logo

qwixx-trainer's Introduction

qwixx-trainer

A genetic algorithm that learns to play the game Qwixx

Setup

install Python and set the check mark in the setup to add Python to the environment variables (or PATH)

go to cmd:

git clone https://github.com/sjanetzki/qwixx-trainer
cd qwixx_trainer
pip install -r requirements.txt

Usage

Trainer

--> genetic algorithm

python trainer.py

Game

--> play via PyGameUi

python game.py

qwixx-trainer's People

Contributors

cnqso avatar dependabot[bot] avatar sjanetzki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

janetzki cnqso

qwixx-trainer's Issues

Build UI with pygame

  • send click from UI to board
  • show the state of the board on UI
  • show dice
  • make possible to make only one cross as an active player
  • prevent UI from closing if invalid turn -> show e.g. error on UI instead
  • make possible to cross as a passive player
  • show valid crosses directly after clicking
  • add skip button (for active and passive player)
  • show if player is active or passive
  • make UI smaller (max. 1/4 of screen)

Find better fitness metric

-Problem:
luck, other players, order of players and strength of players have an influence on the current fitness metric

  • Solution:
    get strength of an AI by playing several times, in different constellations; add points/placements

Improve Excel table

  • complete a row only if allowed
  • take extra points for completing a row into account

Evaluate training

  • visualize progress
  • let one AI play multiple times -> How do results change? How do they reflect the strength?
  • standard deviation of player's points -> look at Gaussian distribution (narrow/ wide), How many games for average? Test for different AIs with different settings and use it to justify the metric. #4
  • evaluate human players for comparison to AIs -> show why AI performs better
  • execute trainer with same settings multiple times -> Does it result in similar AIs? -> reliable or random algorithm? -> which hyperparameters are important?
  • Does it make sense to only accept stronger generations? (assumably not)
  • How many parameters are optimal for the strategy? (ax^n+ bx^(n-1)…)
    • Find typical critical situations (e.g., one cross in the red row with last number 5 , two crosses in yellow row with last number 5 -> where to cross the 6?) => only with a quadratic function you know that you should cross yellow
  • Reduce strategy vectors from 9 to 5 elements (no actual strategic difference between red/ yellow ; green/ blue), at least one strategy for the opponents

Gitpod Integration

Hello! I also have written an AI to play Qwixx in Python! (Matthews-Makes/Qaike)

I think it would be really nice not to have to run the commands that you have listed.
You could definitely set up Gitpod very easily.

Gitpod.io is the website

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.