TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

LeekWars, program your AI to destroy your leek enemies

332 pointsby pil0ualmost 3 years ago

23 comments

lelagalmost 3 years ago
LeekWars has been around for a while now. I remember having a blast playing it with colleagues at least 10 years ago.<p>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.<p>Happy to see it&#x27;s still apparently going strong...
pilowalmost 3 years ago
Hello, I&#x27;m the developer of Leek Wars, thank you for sharing my link!<p>I&#x27;m from France and I&#x27;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.<p>The source code of the game (frontend and fight generation) is available at <a href="https:&#x2F;&#x2F;github.com&#x2F;leek-wars" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;leek-wars</a><p>Happy leek coding :)
评论 #31644919 未加载
austinlalmost 3 years ago
This reminded me of another fun programming game called <i>Elevator Saga</i> (<a href="https:&#x2F;&#x2F;play.elevatorsaga.com" rel="nofollow">https:&#x2F;&#x2F;play.elevatorsaga.com</a>). Essentially, you need to write the code for a system of elevators to transport the maximum number of people in a given time.<p>It&#x27;s a problem I&#x27;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&#x27;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&#x2F;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.
评论 #31635290 未加载
djmipsalmost 3 years ago
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&#x27;m excited there are current code battle arena games.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;RobotWar" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;RobotWar</a>
评论 #31635372 未加载
stefanvdw1almost 3 years ago
If 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?
评论 #31634791 未加载
评论 #31635166 未加载
评论 #31637391 未加载
评论 #31634440 未加载
zidadalmost 3 years ago
Reminds me of Terrarium, which Microsoft introduced with .net, to demonstrate you can safely run sandboxed assemblies in a single process: <a href="http:&#x2F;&#x2F;terrariumapp.github.io&#x2F;" rel="nofollow">http:&#x2F;&#x2F;terrariumapp.github.io&#x2F;</a>
annexrichmondalmost 3 years ago
Reminds me Ants AI Challenge [1] which supported most programming languages. As far as I can tell LeekWars only supports &quot;LeekScript&quot;?<p>[1] <a href="http:&#x2F;&#x2F;ants.aichallenge.org" rel="nofollow">http:&#x2F;&#x2F;ants.aichallenge.org</a>
mizzaoalmost 3 years ago
This reminds me of <a href="https:&#x2F;&#x2F;bot.land&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bot.land&#x2F;</a><p>An amazing game for programmers but one that was shut down due to lack of monetization...
评论 #31638543 未加载
seniorsassycatalmost 3 years ago
Seems like a lot of new players don&#x27;t know they start with upgrade points. I&#x27;m winning most fights with default code because I have 100 more health than the other lvl 1s.
评论 #31637862 未加载
rubyn00biealmost 3 years ago
Me 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.”<p>Me immediately after clicking the link, “yes. Hahaha YES!”
Nuzzerinoalmost 3 years ago
If anyone is having trouble finding the documentation, the original link given from the intro page is broken but the &quot;help&quot; button will take you to the right place: <a href="https:&#x2F;&#x2F;leekwars.com&#x2F;help&#x2F;documentation" rel="nofollow">https:&#x2F;&#x2F;leekwars.com&#x2F;help&#x2F;documentation</a>.
osigurdsonalmost 3 years ago
The site is messed up in Safari (at least on my machine).
评论 #31636038 未加载
评论 #31635098 未加载
gumbyalmost 3 years ago
Is this intended for the Welsh market or can anyone play?
评论 #31636324 未加载
评论 #31634445 未加载
dinklebergalmost 3 years ago
This is amazing. I don&#x27;t have the time to get into something like this these days, but I would&#x27;ve loved something like this in my teens. Instead I wrote bots for RuneScape lol.
valryonalmost 3 years ago
Interesting, I will give it a try.<p>It reminds me Gladiabots (<a href="https:&#x2F;&#x2F;store.steampowered.com&#x2F;app&#x2F;871930&#x2F;GLADIABOTS__AI_Combat_Arena&#x2F;" rel="nofollow">https:&#x2F;&#x2F;store.steampowered.com&#x2F;app&#x2F;871930&#x2F;GLADIABOTS__AI_Com...</a>), but the target audience is not the same.
WJWalmost 3 years ago
Thought this was going to be some type of leetcode leaderboard, but it&#x27;s actually way better than I hoped!
dmixalmost 3 years ago
Another great coding game <a href="https:&#x2F;&#x2F;alexnisnevich.github.io&#x2F;untrusted&#x2F;" rel="nofollow">https:&#x2F;&#x2F;alexnisnevich.github.io&#x2F;untrusted&#x2F;</a><p>I spent 2 hours beating all 20 levels in one sitting.
sudosysgenalmost 3 years ago
I&#x27;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.
squarefootalmost 3 years ago
Also worth of mentioning is Torcs, a racing cars programing game. <a href="http:&#x2F;&#x2F;torcs.sourceforge.net&#x2F;" rel="nofollow">http:&#x2F;&#x2F;torcs.sourceforge.net&#x2F;</a>
Kiroalmost 3 years ago
How do they manage to run untrusted code on the server?
评论 #31635944 未加载
评论 #31635625 未加载
brundolfalmost 3 years ago
Missed opportunity to call it LeekCode
omarhaneefalmost 3 years ago
Tired: Leetcode<p>Wired: Leekcode
joshualmost 3 years ago
mine won&#x27;t compile. it complains about a core leek
评论 #31636141 未加载