Coder Social home page Coder Social logo

jonas-peeters / informaticup2020 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 5.17 MB

Solution for the InformatiCUP 2020 based on a custom implementation of neural networks.

Dockerfile 0.28% Swift 82.62% Metal 2.33% Shell 0.53% TeX 14.24%
informaticup informaticup2020 neural-network

informaticup2020's Introduction

InformatiCUP 2020 Server

von Jonas Peeters

Dies ist eine Einreichung für den InformatiCUP 2020. In dieser ReadMe ist eine Anleitung zur Verwendung. Eine genauere Erklärung, wie der Server arbeitet, ist in Theorie/Theorie.pdf.

Da der Server in Swift geschrieben ist, muss dieses entweder installiert sein (Siehe Installing Swift) oder der Server muss in einem Docker Container laufen. (Get Docker).

Direkt mit Swift starten

Sind Swift und Dependencies (openssl, libssl-dev, clang, libicu-dev, libcurl4-openssl-dev) installiert, so kann der Server mit den folgenden Befehlen compilliert und gestartet werden:

    $ swift build -c release
    $ .build/release/InformatiCUP

Standardmäßig wird der Server im Predict-Modus gestartet. Das heißt, es kann manuell der Client gestartet werden. Weitere Modi sind "stats" für eine Selbstevaluation des Servers und "train", damit die Neuralen Netzwerke weiter trainiert werden. Achtung: Dabei werden die bestehenden neuralen Netzwerke nach jeder Generation überschrieben. Für die Evaluation bitte die beigefügten Netzwerke verwenden.

Unter Linux muss bei den Modi "stats" und "train" zusätzlich mit -c der Pfad zur Linux Version des Clients in binaries/ic20_linux angegeben werden.

Für weitere Optionen siehe die Hilfe mit --help. Diese Hilfe ist auch am Ende dieses Dokumentes zu finden.

Docker

Ist Docker installiert und gestartet, so kann mit den folgenden Befehle ein Docker-Image erstellt und gestartet werden:

    $ docker build -t ic20 .
    $ docker run --name ic20 ic20

Zum Beenden und Entfernen des Containers können die folgenden Befehele verwendet werden:

    $ docker stop ic20
    $ docker rm ic20

Standardmäßig wird der Server im Predict-Modus gestartet. Das heißt, es kann manuell der Client gestartet werden. Weitere Modi sind "stats" für eine Selbstevaluation des Servers und "train", damit die Neuralen Netzwerke weiter trainiert werden. Bei Verwendung von Docker kann dazu der run-Befehl wie folgt abgeändert werden:

    $ docker run --name ic20 ic20 .build/release/InformatiCUP [args] 

Wenn die Modi "stats" oder "train" verwendet werden, muss mit -c /app/binaries/ic20_linux die Linux Version des Clients angegeben werden!

Für die Hilfe kann dementsprechend der folgende Befehl genutzt werden. Die Hilfe ist aber auch zusätzlich am Ende dieses Dokumentes beigefügt.

    $ docker run ic20 .build/release/InformatiCUP --help

Da innerhalb von Docker die Threadpriorisierung scheinbar nicht zuverlässig läuft, wird die Statusanzeige nur unregelmäßig aktualisiert.

Hilfe (Englisch)

Usage: ./InformatiCUP [arguments]

The following arguments are available:
  --mode, -m:   Set the mode of the server to (train|predict|
                stats). [Default: predict]

  --client, -c: Path to the InformatiCUP client. Required for
                predict mode. [Default: ./binaries/ic20_darwin]

  --help, -h:   Show this help

  --mutations:  The number of mutations that are created per
                generation. [Default: 30]

  --games:      Depends on mode:
                Training: The number of rounds each mutation
                     plays per generation. [Default: 15]
                Statistics: The number of games that will be
                     played to generate statistics. [Default: 50]

  --force-cpu:  Force the usage of the CPU engine even if a GPU
                is available. [Default: Disabled]

Additional information:
(1): In training and stat mode the program automatically starts
     instances of the client for training. You do not have to
     start them manually
(2): In the prediction mode -c is ignored. The client is not
     started automatically. You have to start them manually. The
     port is 50123.

informaticup2020's People

Contributors

jonas-peeters avatar

Watchers

 avatar

informaticup2020's Issues

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.