11 ms·
LeekWars, program your AI to destroy your leek enemies
- playhard 4y ago
- playhard 4y agoFIFO
- WJW 4y agoThought this was going to be some type of leetcode leaderboard, but it's actually way better than I hoped!
- omarhaneef 4y agoTired: Leetcode Wired: Leekcode
- gumby 4y agoIs this intended for the Welsh market or can anyone play?
- omginternets 4y agoI was about to make a similar joke, but you beat me to it. I salute your humor.
- fragmede 4y agoI found it playable via in-browser Google translate.
- lelag 4y agoLeekWars 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...
- stefanvdw1 4y agoIf been looking for a game like this or Robocode but where the code that you need to write is written in Rust. Does something like that exist?
- fragmede 4y agoA fun programming exercise would be to write it yourself!
- wongarsu 4y agoIn screeps [1] you program your units in JavaScript, which opens the door to using Rust via WASM [2][3] 1: https://screeps.com/ https://screeps.com/ 2: https://github.com/rustyscreeps/screeps-game-api/ https://github.com/rustyscreeps/screeps-game-api/ 3: https://github.com/rustyscreeps/screeps-starter-rust https://github.com/rustyscreeps/screeps-starter-rust
- jna_sh 4y agoYou can play Battlesnake (https://Battlesnake.com https://Battlesnake.com) in anything, Rust is quite popular.
- hr0m 4y agoThis looks really nice. I'll try that out. Do you know more similar games? I.e. where the choice of the programming language is done by the player?
- Karliss 4y agoYou might be interested in bot programming section of https://www.codingame.com/multiplayer/bot-programming 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. https://en.wikipedia.org/wiki/AI_Challenge 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 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-allcups&utm_medium=referral&utm_source=raic https://cups.online/en/contests/?category=ai&utm_campaign=to...
- joshu 4y agomine won't compile. it complains about a core leek
- PhaedrusV 4y agoBoo.
- rubyn00bie 4y agoMe seconds before clicking the link, “I swear to fucking god if this doesn’t involve leeks fighting each other… I’m gonna be so pissed.” Me immediately after clicking the link, “yes. Hahaha YES!”
- valryon 4y agoInteresting, I will give it a try. It reminds me Gladiabots (https://store.steampowered.com/app/871930/GLADIABOTS__AI_Combat_Arena/ https://store.steampowered.com/app/871930/GLADIABOTS__AI_Com...), but the target audience is not the same.
- osigurdson 4y agoThe site is messed up in Safari (at least on my machine).
- cyanydeez 4y agoSafari is messed up.
- osigurdson 4y agoThat may be but everything else generally works.
- Kiro 4y agoNormally I would agree but games are notoriously hard to get working in Safari (not to mention iOS Safari). It's basically a dead race and I never presume a game will work.
- williamtwild 4y agocare to elaborate or is reddit leaking again?
- osigurdson 4y agoOn Safari (again on my computer), the first few pages of content are constrained to about a small area in the centre of the screen. It looks fine on Firefox. Sorry, I'm not familiar with reddit leaking.
- jeroenhd 4y agoIf you're referring to the pictures sliding off the edge of the central div, I think that's intentional. The website seems to work fine in GNOME Web (tested on Epiphany 3.36.4 and Epiphany 42.2, which both use WebKit 605.1.15). I guess it must be a Safari only problem? Consider reporting your problems to Apple if the website doesn't work right on their browser, as the open source version of the underlying engine renders it fine.
- annexrichmond 4y agoReminds me Ants AI Challenge [1] which supported most programming languages. As far as I can tell LeekWars only supports "LeekScript"? [1] http://ants.aichallenge.org http://ants.aichallenge.org
- djmips 4y agoFor 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. https://en.wikipedia.org/wiki/RobotWar https://en.wikipedia.org/wiki/RobotWar
- fnordpiglet 4y agoSlightly later game comes to mind as well - Core War https://en.m.wikipedia.org/wiki/Core_War https://en.m.wikipedia.org/wiki/Core_War
- animal531 4y agoThe ones I first played were P and C-Robots. It seems there was another Core War that's based on P-Robots: https://corewar.co.uk/probots.htm https://corewar.co.uk/probots.htm
- austinl 4y agoThis reminded me of another fun programming game called Elevator Saga (https://play.elevatorsaga.com 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.
- andrewljohnson 4y agoI hear the sound of elevator engineers cracking their knuckles.
- Kiro 4y agoHow do they manage to run untrusted code on the server?
- GuB-42 4y agoI don't know how it is done here but there are plenty of ways: VMs, sandboxes, etc... There is no problem running untrusted code as long as the I/O and interrupts are protected, something that is a standard feature of all the CPUs and OSes that the server may run on... Unless you find a bug to exploit.
- rashkov 4y agoWhich system calls would enable this protection?
- GeneralMayhem 4y agoIt's a custom interpreted scripting language. As long as the interpreter doesn't have any hooks for disk or network I/O, pointer manipulation, etc., it's pretty safe. You could go further by sandboxing in a VM or suchlike if you're concerned about incidental arbitrary-code exploits, but in reality it's not any more dangerous than running any other game server.
- pilow 4y agoHello, 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. The source code of the game (frontend and fight generation) is available at https://github.com/leek-wars https://github.com/leek-wars Happy leek coding :)
- Game_Ender 4y agoI have loved playing around with this! 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?
- pilow 4y agoHello, thank you! 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!
- dinkleberg 4y agoThis is amazing. I don't have the time to get into something like this these days, but I would've loved something like this in my teens. Instead I wrote bots for RuneScape lol.
- sudosysgen 4y agoI've played this game when I was 10, ans it was tons of fun and a good way of putting programming to practice. I definitely recommend it for any beginners, unless the skill level exploded somehow.
- seniorsassycat 4y agoSeems like a lot of new players don't know they start with upgrade points. I'm winning most fights with default code because I have 100 more health than the other lvl 1s.
- mandarax8 4y agoAh guess why that's why even the test runs have been impossible.
- mizzao 4y agoThis reminds me of https://bot.land/ https://bot.land/ An amazing game for programmers but one that was shut down due to lack of monetization...
- baobabKoodaa 4y agoI immediately thought of Bot Land as well! Oh man, it's been a while.
- mizzao 4y agoAw 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 https://github.com/mizzao/bot.land 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 https://www.youtube.com/watch?v=50vIsSPFgUs EDIT: haha, you're #4 in that screenshot on my repo!
- squarefoot 4y agoAlso worth of mentioning is Torcs, a racing cars programing game. http://torcs.sourceforge.net/ http://torcs.sourceforge.net/
- dmix 4y agoAnother great coding game https://alexnisnevich.github.io/untrusted/ https://alexnisnevich.github.io/untrusted/ I spent 2 hours beating all 20 levels in one sitting.
- brundolf 4y agoMissed opportunity to call it LeekCode
- celdon25 4y agoIf anyone is having trouble finding the documentation, the original link given from the intro page is broken but the "help" button will take you to the right place: https://leekwars.com/help/documentation https://leekwars.com/help/documentation.
- zidad 4y agoReminds me of Terrarium, which Microsoft introduced with .net, to demonstrate you can safely run sandboxed assemblies in a single process: http://terrariumapp.github.io/ http://terrariumapp.github.io/