LeekWars has been around for a while now. I remember having a blast playing it with colleagues at least 10 years ago.
From memory, as you level you get access to more and more API features. A good way to have a stronger leek was to manage to implement algorithms before they were officialy available to you through the API. Ex: instead of waiting to level up to get access to A* pathfinding, you could get a huge advantage against other leeks by implementing it yourself within the memory and cycle constraints you were given for your AI code.
Happy to see it's still apparently going strong...
Hello, I'm the developer of Leek Wars, thank you for sharing my link!
I'm from France and I've been coding this game with my friends since 2012 when I was in University. I try to add features and improve the language from time to time.
We are improving the English documentation/help and translating more pages :) The OOP in LeekScript is very close to JS.
At the moment there is no official way to sync your code, but LW has a REST API you can use to interact with the game programmatically. I would love to implement a proper synchronization with a Git repo in the future!
This reminded me of another fun programming game called Elevator Saga (https://play.elevatorsaga.com). Essentially, you need to write the code for a system of elevators to transport the maximum number of people in a given time.
It's a problem I've thought about every so often, but never bothered to look up how it was commonly implemented. For example, If you have a large building with multiple elevators, is there an optimal way to arrange the elevators while they're idle to minimize transport time? Or what about accounting for time of day? (e.g. stacking the elevators on the bottom floor in the morning as people arrive at the office). Or what advantages do you gain mathematically from having Up/Down buttons vs. the touchpads where people select the exact floor? Seems like an interesting problem if you work on elevators installed in tall office buildings.
For those who are too young or forgot this hearkens back to RobotWar by Silas Warner on the Plato system in 1970s and later on the Apple II (1981) and there may well have been something from an earlier time on the old big iron. Does anyone know of anything earlier? I had so much fun on RobotWar and it had an impeccable source level debugger which was a revelation in 1981. I'm excited there are current code battle arena games.
You might be interested in bot programming section of https://www.codingame.com/multiplayer/bot-programming . The programming interface is standard input output based so they support a lot of programming languages including Rust.
They also occasionally organize live tournaments lasting for a week or two, which introduce a new game. From the names like fall-challange-2021 and spring-challange-2021 I assume those happen no more than every 6 months.
In general the ones that are in form of temporary contests often support many languages due to same reason I mentioned before. One thing to watch out that due to sandboxing reasons and the platform needing to compile your code any third party libraries are usually not available. This might be slightly more painful for Rust and their crate based ecosystem.
Reminds me of Terrarium, which Microsoft introduced with .net, to demonstrate you can safely run sandboxed assemblies in a single process: http://terrariumapp.github.io/
Aw man, I made some truly OP bots for bot land. And a set up a custom TypeScript to BotLandScript compiler for them: https://github.com/mizzao/bot.land
So many improvements in that repo, that I didn't get to finish
From memory, as you level you get access to more and more API features. A good way to have a stronger leek was to manage to implement algorithms before they were officialy available to you through the API. Ex: instead of waiting to level up to get access to A* pathfinding, you could get a huge advantage against other leeks by implementing it yourself within the memory and cycle constraints you were given for your AI code.
Happy to see it's still apparently going strong...
I'm from France and I've been coding this game with my friends since 2012 when I was in University. I try to add features and improve the language from time to time.
The source code of the game (frontend and fight generation) is available at https://github.com/leek-wars
Happy leek coding :)
Two quick things:
- The documentation about classes in LeekScript v2/v3 has no English translation so it's not clear from that tutorial you can use them.
- Do you have a recommended way to handle version control and editing? Some way to sync from GitHub, or maybe an API to use?
We are improving the English documentation/help and translating more pages :) The OOP in LeekScript is very close to JS.
At the moment there is no official way to sync your code, but LW has a REST API you can use to interact with the game programmatically. I would love to implement a proper synchronization with a Git repo in the future!
It's a problem I've thought about every so often, but never bothered to look up how it was commonly implemented. For example, If you have a large building with multiple elevators, is there an optimal way to arrange the elevators while they're idle to minimize transport time? Or what about accounting for time of day? (e.g. stacking the elevators on the bottom floor in the morning as people arrive at the office). Or what advantages do you gain mathematically from having Up/Down buttons vs. the touchpads where people select the exact floor? Seems like an interesting problem if you work on elevators installed in tall office buildings.
https://en.wikipedia.org/wiki/RobotWar
https://en.m.wikipedia.org/wiki/Core_War
1: https://screeps.com/
2: https://github.com/rustyscreeps/screeps-game-api/
3: https://github.com/rustyscreeps/screeps-starter-rust
They also occasionally organize live tournaments lasting for a week or two, which introduce a new game. From the names like fall-challange-2021 and spring-challange-2021 I assume those happen no more than every 6 months.
In general the ones that are in form of temporary contests often support many languages due to same reason I mentioned before. One thing to watch out that due to sandboxing reasons and the platform needing to compile your code any third party libraries are usually not available. This might be slightly more painful for Rust and their crate based ecosystem.
https://en.wikipedia.org/wiki/AI_Challenge series used to be good but they are not organizing new ones. VK organizes yearly contests called "Russian AI cup" with very similar format as AI_Challange https://en.wikipedia.org/wiki/Russian_AI_Cup . Although participation currently might be messy due to the current political situation. Also the website isn't fully translated to English. List of old contents can be found here https://cups.online/en/contests/?category=ai&utm_campaign=to...
[1] http://ants.aichallenge.org
An amazing game for programmers but one that was shut down due to lack of monetization...
So many improvements in that repo, that I didn't get to finish
Check out this video for how they wrecked 5v12 with 3 attackers / 0 defenders alive at the end: https://www.youtube.com/watch?v=50vIsSPFgUs
EDIT: haha, you're #4 in that screenshot on my repo!