Live data from Hacker News

Show HN: JavaScript Battle – A daily artificial intelligence battle

javascriptbattle.com

11–20 of 43 posts

Re: Show HN: JavaScript Battle – A daily artificial intelligence battle

#11
post #3

CoreWars but with JS and GitHub! Cool idea. I'd be very interested in hearing about the server-side setup, especially around isolating the code so some rando doesn't "require('fs')" and do damage to the server. How are you isolating the brains from the sensitive game data and from each other? How long does a single game take to run given max users? How are you protecting against "while(true);"? Here's a repo that loo…

Thanks so much for the interest and the questions. You are correct in that the web-workers repo is related. Its the repo we use on the back end. To answer your questions in turn: "How are you isolating the brains from the sensitive game data and from each other?" - We are sandboxing each user's code in an isolated environment where a server listens for a POST request on a specified endpoint. That request carries the…

So the AI can use up to 2 seconds of "thinking time" for each move on a some x86-server-like machine? Having played BitBath [0], I think this limit matters.

No matter how many turns are played, a match ends after 30 minutes? According to the rules, no team wins in this case?

[0] http://www.hacker.org/bitbath/

Re: Show HN: JavaScript Battle – A daily artificial intelligence battle

#14
post #10

The "see todays battle" renders incorrectly on chrome Version 38.0.2125.101 beta

Thanks for the heads up--working on it now, should be back up in a couple minutes. I'll follow up when it is.

It should be up again--let me know if you're still having trouble viewing it.

Re: Show HN: JavaScript Battle – A daily artificial intelligence battle

#15
post #11

Earlier quoted context omitted.

Thanks so much for the interest and the questions. You are correct in that the web-workers repo is related. Its the repo we use on the back end. To answer your questions in turn: "How are you isolating the brains from the sensitive game data and from each other?" - We are sandboxing each user's code in an isolated environment where a server listens for a POST request on a specified endpoint. That request carries the…

So the AI can use up to 2 seconds of "thinking time" for each move on a some x86-server-like machine? Having played BitBath [0], I think this limit matters. No matter how many turns are played, a match ends after 30 minutes? According to the rules, no team wins in this case? [0] http://www.hacker.org/bitbath/

Thanks for the clarification. I wasn't very clear in my answer before. The game ends after a maximum of 1250 turns or when all of one team's heroes are killed. If the maximum turn is reached, the team with the most diamonds wins. If every player on the team took the full 2 seconds on every turn, the game would last around 30-40 minutes.

Re: Show HN: JavaScript Battle – A daily artificial intelligence battle

#18

So Vindinium in JS. Not a bad idea.

Yep! The gameplay is very similar, but the tech stack, signup process, method for participating, stats, etc are all different from Vindinium. But they were definitely our inspiration (as Forrest mentioned, we actually have an "Inspired by Vindinium" link in our footer).
Post reply on HN