Giter Site home page Giter Site logo

paintbot's Introduction

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Paintbot

A game of wits between programmers where they develop bots to compete against each other in painting a canvas in their bot's color. The webpage for the game can be viewed at https://paintbot.cygni.se/

Originally based on Cygni's Snakebot

This is the server and api repository, other parts:

Want to create your own client?

If you want to create your own client, please take a look at Client info

Getting started with intellij

  • Make sure you have enabled the gradle plugin in intellij
  • When creating the project, be sure to import the build.gradle file, otherwise things go wrong

To do test-runs:

  • Start up the server with
> ./gradlew clean build
> ./gradlew bootRun
  • Start up the webapp as described in the README. You have to change some configuration for it to go towards your local server.
const location = { origin: "http://localhost" };
  • Execute the main-method of one of the clients in the clients folder
  • Check the console for a link to watch the finished game, it should be in the format of
http://localhost:3000/game/{gameId}

New Release

To create a new release using a git repo as the artefactory simply ensure the build.gradle file uses a local folder to "publish" the artifacts, which should be default. Then run ./gradlew api:publish, ./gradlew client:publish and ./gradlew client-util:publish. This should build the artifacts under releases/. This folder should then be copied into the paintbot-maven-repo projects and pushed to the main branch.

Infrastructure

In order to update the infrastructure please try to use the terraform scripts in 'terraform' folder

cd terraform
AWS_PROFILE=westbos terraform apply

Most of the AWS resources are in the terraform state some still needs to be imported.

paintbot's People

Contributors

89netram avatar dr-horv avatar emilb avatar hfurhoff avatar juiceit avatar maxdavidson avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paintbot's Issues

Set default obstacles to 50

The default game settings should have number of obstacles to be 50 for a more fun and engaging environment

Might wanna change this before the tourny

Hi cygni / maintainers of paintbot!

I am currently just going through the source code in order to automate some parts of my training model for my bot and I stumble upon how you have implemented authorization. Cool I first thought, I can use it to get the token to authorize some websocket calls. But then out of curiosity, I tried the usercredentials on the live website aswell, and yeah.. Bad news. I got authorized.

Skärmavbild 2021-04-29 kl  18 53 20

I hope this can be changed before the tournament starts, because this will break the fairness of the game, if someone outside of the organizers gets hold on an auth-token.

Map<String, String> users = new HashMap<String, String>() {{
put("emil", "lime");
put("chen", "nehc");
put("johannes", "sennahoj");
}};

Just change the usercredentials for the live server.

Thanks for hosting this, and I hope I will get a seat.

I am currently the 1st on the waiting list (Accordingly to Josefina, A.)

Document API

At least provide JSON-examples of API

  • Endpoints
  • Websocket messages

Client API: Ownership of Tile

Add to the client utils for all clients that it should be easier to check if a tile is coloured and by whom.

Right now you have to loop over all characters, check their coloured positions and see if that matches a tile.

Add jitter to collision stun

Problem: Two bots may end up indefinitely stunning each other by headbutting for the same tile over and over again

Proposed solution: Add randomness to the stun duration for collisions which would allow one bot to escape an aggressor.

  • Add setting for minimum stun duration
  • Add setting for maximum stun duration
  • Change collision stuns to be random between min and max

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.