Giter Club home page Giter Club logo

aichallenge's Introduction

ZeusWPI

Zeus Extraordinary Uploading Service With Productive (Prolog) Interface

Development

Install SWI-Prolog using asdf.

asdf install

This project relies on Redis for performant session storage. You can start an instance using the provided docker-compose.devel.yml file.

Next create the required directories.

mkdir -p {data,files}

Then start the development (Live reload) server using:

swipl src/main.pl devel 5000

Or run the above steps by running make devel.

Visit your browser at http://localhost:5000.

Deployment

The deployment setup is contained in the provided docker-compose.yml file.

There are 3 environment variables to change:

Key Value
ZEUSWPI_CLIENT_ID The OAUTH Client ID
ZEUSWPI_CLIENT_SECRET The OAUTH Secret
ZEUSWPI_REDIRECT_URI The OAUTH Redirect URI (Set the correct domain)

You also need to create the required directories in this mode. As these will be mounted as volumes in the container.

mkdir -p {data,files}

Then start with:

docker compose up -d

Adding admins

First the person you want make an admin has to log in to the application once. Then on the server find the user fact in the database data/user.db

assert(user(69,"the_admin",user)).

and update the record to

assert(user(69,"the_admin",admin)).

then restart the application.

aichallenge's People

Contributors

becousae avatar emerckx avatar feliciaan avatar iasoon avatar pietervdvn avatar procrat avatar rien avatar tl3ilaxu avatar tomnaessens avatar vandorpedavid avatar werthen avatar wschella avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

aichallenge's Issues

Support Java

Stderr of YoloBot_(davit) was /bin/bash: java: command not found

Kick-off presentation

We will need some fancy presentation slides for the kick-off, so that we can deliver a proper explaination and not appear as bunglers.

Map generator output

The map generator should be updated to output the format we decided upon.
It should also fill in starting positions for the players.

Extend firejail with cgroups

  • Install cgroups-bin.
  • Confirm that kernel has cgroups enabled. If not, try to enable them.
  • Make a cgroup for bots. (One is sufficient; subgroups are possible.)
  • Add an option to firejail to use this cgroups

Update site

  • Explain rules
  • Explain parser formats
  • Login functionality
  • Upload functionality

No session refreshes

There are always two sessions running: one for the web server and one for the ranker. For some reason the session of the web server doesn't get the newly played matches that the ranker commited.

I tried fixing this by using a scoped_session and calling Session.remove() before each request. This didn't work.

It's now temporarily fixed by reloading the web server every twenty minutes with cron. (Let the shaming begin.)

Human player interface

It could be useful to have a friendly interface to control a player yourself. This way you can easily test your bot's reaction to certain types of play. A scenario editor would be great as well.
If we share code with the visualizations, this might not be too much work.

Announce new website + finale

  • Write blogpost
  • Announce on Zeus + Cicero mailing list
  • Announce on Facebook page
  • Announce on Twitter
  • Announce on Facebook groups

Summary: We made a visualizing ranking website. (First?) codenight on Tuesday 12th April. We will have a finale on xx May.

Add tests for the arbiter

We should at least test the following

  • Test with working bots
  • Test with a map file with existing marches
  • Test with a bot that outputs "? marches"
  • Test with a bot that times out
  • Test with a bot that gives incomplete output (e.g. "4 marches" and then
    only 3)
  • Test with a mischievious bot
    • Marches between forts of other players
    • Marches between non-existing forts
    • Marches on non-existing roads
  • Test with a bot that gives an incorrect syntax (e.g. "? mraches")
  • Test with a bot immediately stops
  • Test with a bot that stops unexpectedly mid-game
  • Test arbiter as an executable

Open source bots

Add an option to open source your bot. That'd make it easier to brag with the sedbot.

Multiplayer ELO

The ELO rating system doesn't properly handle matches with more than two players. So far, we haven't organized any multiplayer matches, so it's not a big deal at the moment.

At the moment, the calculation for a change in rating for some player A in a match against {Pi} happens as follows. The mean is taken over all would-be rating changes if A battled against each of {Pi} separately.
This scheme has already been put to good use in other places, but it is made for cases where each match results in a ranking instead of -- in our case -- a single winner. E.g. a loser might have won mid-game against an opponent -- this would be hard to track -- but the rating system would account for a loss against this opponent.

Example code

We need some examples to help everyone get started.

Will @SirDestrox bot do, or will we need more?

Ending the game

How will we prevent games from going on forever? What do we do when players take to action at all, or just do stupid shit that doesn't help the game move forwards?

Syntax error when running example code

Hello Zeus

I have tried to run the the arbiter with the test.json configuration, but I'm always getting syntax errors. Apparently the other members of my team don't have this issue. I've added the error output below.

$ python3.5 arbiter.py test.json

Traceback (most recent call last):
  File "../testbots/destroybot.py", line 83, in <module>
    game = Game(sys.argv[1])
  File "../testbots/destroybot.py", line 34, in __init__
    self.parse_input()
  File "../testbots/destroybot.py", line 37, in parse_input
    self.parse_forts()
  File "../testbots/destroybot.py", line 42, in parse_forts
    for i in range(int(input().split()[0])):
  File "<string>", line 1
    6 forts:
          ^
SyntaxError: invalid syntax
  File "../testbots/testrobot.py", line 144
    def orders(self) -> str:
                     ^
SyntaxError: invalid syntax

Before running the example code, I've just installed Python 3.5.1 on my linux machine (elementary OS), which you can clearly see in the output below.

$ python3.5 --version
Python 3.5.1

Is there something that I'm forgetting? (I'm quite new to Python)

Sincerely yours,
Ewout

Describe rules

We need a nice and clear formulations of the rules for the game.

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.