6 ms·
Generals.io Bot API: Build bots to play against humans
- qwertyuiop924 10y agoThis might revive my interest in Generals, as I found it a mixture of boring and excitingly stressful when I played by hand. However, because Generals is an RTS, bots might have a pretty steep advantage (although movements take a good bit of time, so it's not as bad as it could be). Does anybody know how bad this is in real play?
- Matetricks 10y agoI think the move rate is capped at two per second, so even bots will have limitations in their movement speed.
- popey456963 10y agoAlthough we haven't had many bots on bot.generals.io yet (early days), my experience of playing against bots on the main leagues show that although we had several dozen bots built, all of them were no match for a competent human being. The only one that comes close is called "Sora AI", but that AI can be easily beaten by anyone in the top fifty odd. I'd be interested to see if a bot will be able to always defeat players, waiting for what will happen with this latest release.
- reitzensteinm 10y agoThe bots were all pretty incompetent, but it was INFURIATING to play against a dumb bot that does nothing but attack you. Unlike a player, where you have a decent chance to juke their stack and cap them (and then have a great chance to win), many dumb bot implementations would just aggressively trade 1:1, basically guaranteeing that you're both screwed. I got up to rank #3 on the FFA US server, and spawning next to Simple Bot would mess me up more than spawning next to an 80+ (back when it topped out at ~86). That, and the terrible latency handling (if your internet is acting up a tiny but, you basically have no chance to win), was what made me stop playing eventually.
- popey456963 10y agoWell, then I'm glad I think we've fixed both of these issues! Bots now can only play on one server, so people have the choice of playing against them. Also we've significantly reduced the impact of lag by allowing you to queue up moves, even in enemy territory. Although all real-time games need a certain amount of reliability in your internet connection to work, I think we've recently reduced it significantly. Although, of course, any suggestions you have for improvement would still be useful!
- reitzensteinm 10y agoNo, that's perfect. Certainly there's always going to be a limit to lag compensation, but it was very frustrating when you could no longer double move, but your opponent could.
- vzhou842 10y agoEveryone is server-capped at 2 moves per second, and bots will also be subject to networking conditions (ping, lag spikes) just as players are since bots are hosted by their creators.
- TheSmiddy 10y agoYeah but you can also host your bot in a datacentre which doesnt have the same reliability issues as residential internet.
- m00x 10y agohttps://halite.io https://halite.io is pretty similar if you'd like to play against bots only. Plus it has a great forum that has a few posts on creating a bot using ML.
- vzhou842 10y agoagreed, halite is a well run challenge. The site gives a shoutout to halite: http://dev.generals.io/faq http://dev.generals.io/faq
- conflagration 10y agoHalite also looks interesting, but I think with generals bot-makers will have much more possibilities, because there are no limitations for your implementation. The game mechanics might also a little more challenging in generals, especially the fog of war makes a huge difference imo.
- Analog24 10y agoYou'd be surprised how many implementation options there are in halite. People have come up with starter packages for just about every language you would ever want to use.
- joelthelion 10y agoUnfortunately, the halite challenge is almost over and they will shutdown the site afterwards.
- conflagration 10y agoThis will be super interesting. I think this game makes very much sense as an intermediate frontier on the road to a StarCraft AI. Here are my reasons: * The playing field is relatively limited, just a little larger than Go. This makes it much more approachable than StarCraft as you will not need a server farm to get started. * It has a fog of war, so a bot needs to handle uncertainty and have a memory. * It's controlled through a web API and allows total freedom for the bot implementation by that. * There are very competitive humans players. * There is already a very huge dump of replays to train on. I really hope this will get traction and establish as an ongoing AI competition. Also it will be very interesting, when the first bots will be better than the top humans here.
- pfista 10y agoThis is great, I'm glad the developers are officially supporting this now. I had started building a simple bot before this was released https://github.com/pfista/generals https://github.com/pfista/generals
- juancampa 10y agoThis is very interesting and I'd love to play with it. As a player though, the thought of being matched against a bot sucks in the sense that it makes the game less enjoyable. I enjoy winning (mostly losing) against flesh and bone humans. I wonder if the folks of generals.io would implement a different "league" where bots are somehow not allowed.
- conflagration 10y agoThat is already there :) Only one of the three servers allows bots.
- aevitis 10y agoThis is going to add a great new dimension to the game, especially in terms of being able to 2v2 with a bot for a partner.
- mninm 10y agoDo bots watch ads? For the last several weeks I've been an avid generals player. For awhile I was even ranked #7 on the FFA ladder. And I have to say that this is the second change in about a week that has left me confused about who generals is trying to appeal to. Maybe the bots will be fun for humans to play against but I doubt it. Maybe this will be a benign change and the quality of the bots that play generals on the non-bot servers won't improve much from what they are now. But either way why is an ad-supported game encouraging bots to try and take it over? What happens when the bots become so good and so prevalent that humans can't hope to compete? Why would anyone want to play? Though I guess in the end I don't really care all that much as the recent changes to the movement scheme have really put me off the game. High level play used to be about feints and visibility, cutting off your opponents tendrils whilst building your own, pulling their forces away from your king while trying to find theirs. It really had a nice balance. Now, not so much. I don't want to seem too sour. I had a lot of fun with generals [thanks devs] but now I'm in search of a new favorite game. PWG
- popey456963 10y agoI think I'd like to point out two very important points you may be missing: 1. This was implemented directly to combat the prevalence of bots on the EU & NA servers (and the annoyance some players were facing when they were just playing AIs all the time), where you're now not allowed to bot on. Players have the option of choosing whether or not they wish to play against bots, but if they wish not to they can still play on the NA and EU servers. 2. We're supported by ads, but that doesn't mean we want to stop people enjoying the game in their own ways. We still have tens of thousands of players daily on the other servers, so a few tens of pounds on a bot server for people to compete in programming against one another doesn't seem too problematic. And, to address your movement concern, it was a tough decision to make. But we wanted to allow everyone to enjoy the game, even people with lag or on mobile devices (where control is significantly harder). If you dislike the new movement settings, you are able to disable them in the options menu.
- chadnickbok 10y agoI've spent far too much of my life playing you're damn game, and now you just went ahead and ruined my weekend. Thanks! Keep up the great work ;)
- crisopolis 10y agoFix the paragraph on the Bot API page... "Your bot will be self-hosted, meaning you don't upload anything to your servers (we never see your code)."
- popey456963 10y agoOooh, nice catch! Made the fix, will be updated next time we release. EDIT: Well, I tried, Vzhou beat me to fixing it.
- jjshanks 10y agoI started making a bot last night but it keep getting disconnected in the first 10ish rounds. Anyone else see this and resolve it?
- popey456963 10y agoCould you give us some details on this? Like which web socket library you used, the technology you used, etc? If you copy & paste the example bot verbatim, does that work for over 10 rounds? As far as I know we've got tens of bots working at the moment and I haven't heard this strange problem from anyone else.
- jjshanks 10y agoI don't have the code handy at the moment but I was using ruby with this socket.io gem 'socket.io-client-simple' I was able to connect, join a game, send chat messages, just couldn't stay connected. I basically just converted the JS tutorial on the site to ruby style.
- phanone2017 10y agoAre all game replays since inception stored in a database? It would be great if you could release one grand zip file to the public that could then be hosted on S3. Even a subset of say all games of the top 200 FFA players would make an interesting training data set!
- popey456963 10y agoAlready released! You can see the page explaining it here: http://dev.generals.io/replays http://dev.generals.io/replays It contains 200,000 games of varying levels, so should hopefully make good training data.
- joelthelion 10y agoOne thing that's missing is a tool to reconstruct a bot's input at a particular turn from the replays (they don't have fog of war).
- dnautics 10y agoI know this could be a bit of a big ask because obviously it would be too easy to clone the website, but is there any chance of a headless game server that would let us do adversarial training?
- adoos 10y agoAwesome stuff. I think a bot server is a logical choice and a good one. It will be neat to see what people can come up with.