AncientBeast
AncientBeast copied to clipboard
play versus AI / bots [bounty: 5555 XTR]
The game is eventually meant to bring people together, at parties or playing with strangers from nearby. Anyway, there are some cases where bots could come in really handy, like for testing purposes in order to not annoy other players, when there's no one who could play with you nearby (hopefully not the case very often) or for people who are not competitive at all, so there should be at least some generic bots for now. If the bot can actually learn from a neural network set-up from lots of players and greatly improve, he could even become the supreme challenger (so it should have difficulty levels). Pre-match UI would need to include the setting.
This could also make the game to generate a bit of income from game portals, without having to force players to register. Self-playable demos could also be autogenerated in order to demonstrate the game when the pre-match menu is being idle.
Eventually the A.I. could have a library of traits that would be hand picked for each unit, defining their character and such. Ideally a neural network type of AI will figure most things out by itself by trial and error.
@turjuque If you have any interest in this, feel free to go for it, otherwise there might be some people out there passionate about this kind of stuff; been actually approached before for this kind of stuff but I refused and didn't really kept in touch sigh
This js library could be used https://github.com/louisstow/fann.js - it's meant to learn and adapt itself.
Something along the lines of this https://lychee.js.org repo: https://github.com/Artificial-Engineering/lycheejs
More https://www.reddit.com/r/INAT/comments/60n4em/experienced_programmer_looking_for_a/df923nm
This library https://github.com/nicolodavis/boardgame.io could be used for AI.
Hi, AI is my area. Here are some thoughts:
- The code has to have the player decisions clearly marked. Looking at the code, it looks like some decisions are given to the player in the form of available UI elements (but I may be mistaken). If that's the case, the code will need to evolve to make the decisions more explicit.
- With the player and its decisions available at every moment clearly marked, a random player can be implemented. (A random player has plenty of value, it will be fun to play and a human should be able to learn the rules of the game and beat the random player without trouble.)
- A few rules (e.g., if opponent picks beast A, never pick beast A, etc.) can be thrown in to make the random player less random and more performant.
- From there, a full-fledged AI player can be trained using reinforcement learning and the OpenAI Gym formalism. But that might be unnecessary and such AI players might be too good to be fun to play.
Hey! Good to know this is actually your thing.
Hi, AI is my area. Here are some thoughts:
Hey! Good to know this is actually your thing.
- The code has to have the player decisions clearly marked. Looking at the code, it looks like some decisions are given to the player in the form of available UI elements (but I may be mistaken). If that's the case, the code will need to evolve to make the decisions more explicit.
The UI is just a reflection of the game mechanics. Though the ability code will get rewritten to become more like an API instead of pretty much reinventing the wheel with each unit, even if rarely 2 abilities are really alike, see issue #1469
- With the player and its decisions available at every moment clearly marked, a random player can be implemented. (A random player has plenty of value, it will be fun to play and a human should be able to learn the rules of the game and beat the random player without trouble.)
Each ability or action has clearly defined rules / requirements. I was totally hoping for a random bot for a long time now to be honest. Most games actually implement something like that so that noobies have someone easy to play against to get things going. I recall playing Chessmaster 5500 against that monkey-AI xD
- A few rules (e.g., if opponent picks beast A, never pick beast A, etc.) can be thrown in to make the random player less random and more performant.
Yeah, I totally agree. This is why I opened this issue years ago #829 - it's basically the start of a "neural network" type of thing.
- From there, a full-fledged AI player can be trained using reinforcement learning and the OpenAI Gym formalism. But that might be unnecessary and such AI players might be too good to be fun to play.
Indeed. I bumped into OpenAI a few times while playing Dota2. And damn, it's super nasty overall; I did study about it quite a bit. I know what you're saying, while AI could become super strong, the game should be more about human vs human. There will dudes making bots and trying to duel others out of their crypto, but will want to accept bots officially if defined as so. Basically bots could fight other bots most of the time (kinda like Golem duels in Diablo 2), but players can also take a swing at fighting them if they're willing to do so.