Coder Social home page Coder Social logo

asimmon / bomberjam-contest Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 6.0 9.51 MB

Bomberjam is an artificial intelligence programming challenge.

Home Page: https://bomberjam.anthonysimmon.com

License: GNU General Public License v3.0

C# 62.00% Dockerfile 0.79% HTML 7.53% JavaScript 1.83% Python 9.43% Shell 0.39% TypeScript 10.41% SCSS 0.68% PowerShell 0.03% Batchfile 0.18% Java 3.14% Go 1.43% PHP 2.16%
hackathon codejam competitive-programming artificial-intelligence

bomberjam-contest's Introduction

Bomberjam

Bomberjam is now live πŸŽ‰: https://bomberjam.anthonysimmon.com

Bomberjam is an online artificial intelligence programming challenge. Write your bot using one of six languages (C#, Go, Java, JavaScript, Python and PHP) and fight against other players to reach the first place in the leaderboard.

Players control a bot using the programming language of their choice. Four bots fight in a 2D grid. The bot with the highest score wins. One player can get points by destroying blocks, hitting another player and being the last player alive.

  • Sign in with your GitHub account
  • Download the latest starter kit on GitHub
  • Learn the game mechanics and write your bot
  • Upload your bot source code as a single zip file
  • We will compile your bot and tell you if something went wrong
  • We will periodically schedule games and update your score

Local development setup

Website configuration

Check appsettings.json for required parameters. They can be set as environment variables too:

  • GitHub__ClientId: GitHub OAuth app client ID that redirects to https://localhost:5001/signin-github-callback
  • GitHub__ClientSecret: GitHub OAuth app client secret that redirects to https://localhost:5001/signin-github-callback
  • GitHub__Administrators: Comma-separated list of GitHub ID administrators
  • SecretAuth__Secret: A secret token that will be used by the worker to communicate with the website API
  • ConnectionStrings__BomberjamContext: SQL Server database connection string
  • ConnectionStrings__BomberjamStorage: Azure Storage connection string, used for bots and game replays storage

Use Azure Storage Emulator and SQL Local DB for lightweight alternatives to Azure Storage and SQL Server.

SQL Local DB

Creating the database with initial data is a one time thing:

cd <checkoutDirectory>\website\Bomberjam.Website
SqlLocalDB.exe create bomberjam
SqlLocalDB.exe start bomberjam
dotnet ef database update

Once you've done that, just start the database when you need it: SqlLocalDB.exe start bomberjam

Azure Storage Emulator

Just start the emulator and use UseDevelopmentStorage=true as connection string.

Worker Docker configuration

Building the image:

cd <project root path>
docker build --tag asimmon/bomberjam-worker:latest -f worker.Dockerfile .

The worker Docker container requires specific environment variables to communicate with the Bomberjam API. Also, privileged access is required by iptables and control groups.

Use the included docker-compose.yml to start a worker configured to work with a local hosted website.

bomberjam-contest's People

Contributors

asimmon avatar guillaume-docquier avatar renovate-bot avatar vegar avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

bomberjam-contest's Issues

Renovate dependency dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

  • Update NuGet dependencies (AspNet.Security.OAuth.GitHub, Azure.Storage.Blobs, FluentAssertions, Hangfire.AspNetCore, Hangfire.Core, Hangfire.SqlServer, Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore, Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation, Microsoft.EntityFrameworkCore.Design, Microsoft.EntityFrameworkCore.SqlServer, Microsoft.EntityFrameworkCore.Tools, Microsoft.NET.Test.Sdk, Mono.Options, Serilog, Serilog.Sinks.Console, dotnet-sdk, xunit, xunit.runner.visualstudio)
  • Lock file maintenance NPM dependencies (undefined, @fortawesome/fontawesome-svg-core, @fortawesome/free-brands-svg-icons, @fortawesome/free-solid-svg-icons, @types/react, @types/react-dom, bootstrap, bootswatch, browser-sync, browser-sync-webpack-plugin, clean-webpack-plugin, css-loader, highlight.js, mini-css-extract-plugin, pixi.js, postcss-loader, postcss-preset-env, react, react-dom, sass-loader, source-map-loader, ts-loader, typescript, url-loader, webpack, webpack-cli)

Detected dependencies

docker-compose
docker-compose.yml
  • mcr.microsoft.com/mssql/server 2019-GA-ubuntu-16.04
dockerfile
website.Dockerfile
  • mcr.microsoft.com/dotnet/aspnet 6.0
  • mcr.microsoft.com/dotnet/sdk 6.0
worker.Dockerfile
  • ubuntu 20.04
github-actions
.github/workflows/engine-publish.yml
  • actions/checkout v3
  • actions/setup-dotnet v3
  • actions/upload-artifact v3
.github/workflows/renovate.yml
  • actions/checkout v3
.github/workflows/website-build-ci.yml
  • actions/checkout v3
  • actions/setup-dotnet v3
.github/workflows/worker-docker-build-ci.yml
  • actions/checkout v3
npm
starters/JavaScript/package.json
website/Bomberjam.Website/package.json
  • @fortawesome/fontawesome-svg-core ^1.2.36
  • @fortawesome/free-solid-svg-icons ^5.15.4
  • @fortawesome/free-brands-svg-icons ^5.15.4
  • bootstrap ^4.6.1
  • bootswatch ^4.6.1
  • highlight.js ^11.3.1
  • pixi.js ^5.3.11
  • react ^17.0.2
  • react-dom ^17.0.2
  • @types/react ^17.0.37
  • @types/react-dom ^17.0.11
  • browser-sync ^2.27.7
  • browser-sync-webpack-plugin ^2.3.0
  • clean-webpack-plugin ^4.0.0
  • css-loader ^6.5.1
  • mini-css-extract-plugin ^2.4.5
  • node-sass ^6.0.1
  • postcss-loader ^6.2.0
  • postcss-preset-env ^7.0.1
  • sass-loader ^12.3.0
  • source-map-loader ^3.0.0
  • ts-loader ^9.2.6
  • typescript ^4.5.2
  • url-loader ^4.1.1
  • webpack ^5.64.3
  • webpack-cli ^4.9.1
nuget
common/Bomberjam.Common/Bomberjam.Common.csproj
engine/Bomberjam.Tests/Bomberjam.Tests.csproj
  • xunit.runner.visualstudio 2.4.3
  • xunit 2.4.1
  • Microsoft.NET.Test.Sdk 17.0.0
  • FluentAssertions 6.2.0
engine/Bomberjam/Bomberjam.csproj
  • Mono.Options 6.6.0.161
global.json
  • dotnet-sdk 6.0.404
starters/CSharp/MyBot.csproj
website/Bomberjam.Website/Bomberjam.Website.csproj
  • Serilog.Sinks.Logz.Io 6.0.0
  • Serilog.Sinks.Console 4.0.1
  • Serilog.Sinks.ApplicationInsights 3.1.0
  • Serilog.Extensions.Logging 3.1.0
  • Serilog.AspNetCore 4.1.0
  • Serilog 2.10.0
  • Microsoft.EntityFrameworkCore.Tools 6.0.0
  • Microsoft.EntityFrameworkCore.SqlServer 6.0.0
  • Microsoft.EntityFrameworkCore.Design 6.0.0
  • Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation 6.0.0
  • Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore 6.0.0
  • Hangfire.SqlServer 1.7.27
  • Hangfire.Core 1.7.27
  • Hangfire.AspNetCore 1.7.27
  • GSoft.ComponentModel.DataAnnotations 1.0.0
  • Azure.Storage.Blobs 12.10.0
  • AspNet.Security.OAuth.GitHub 6.0.0

Error running engine on OSX Big Sur 11.2.1

What I did

What happened

$ ./run_game.sh                                                         137 ↡
Unhandled exception. System.Exception: Failed to start the process 'node MyBot.js --logging'
 ---> System.ComponentModel.Win32Exception (2): No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Bomberjam.BotProcess.Start()
   --- End of inner exception stack trace ---
   at Bomberjam.BotProcess.Start()
   at Bomberjam.Worker.CreateProcesses()
   at Bomberjam.Worker.Work()
   at Bomberjam.Program.Main(String[] args)
./run_game.sh: line 3: 34651 Abort trap: 6           ../../engine/bomberjam --output replay.json "node MyBot.js --logging" "node MyBot.js" "node MyBot.js" "node MyBot.js"

Go support

Nice project! I would like to give it a try with a bot written in Go. I think Go is quite a popular language for AI and it would be nice to see support for it on this project.

Downloads not available because pipeline run too old

I don't know if downloading from pipeline artifacts is the right way because right now GitHub doesn't let me.

From the overview page it says that all three artifacts are expired. They're also not clickable in any way.
overview

And when I select one on the left or in the box, it says more verbosely: β€œThe logs for this run have expired and are no longer available.”

logs

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.