AI Move Analysis (Split from 3 Events running)
Haha, what? I'm also interested if they've considered making the AI "less dumber-er" and if so, why or why not. Did Kamahl edit out some exceptionally whiny part of his post or is jozier just being an even worse jozier than jozier?
Mod edit (Riggy): Splitting discussion of AI stuff into it's own thread.
Mod edit (Riggy): Splitting discussion of AI stuff into it's own thread.
0
Comments
-
gamar wrote:Haha, what? I'm also interested if they've considered making the AI "less dumber-er" and if so, why or why not. Did Kamahl edit out some exceptionally whiny part of his post or is jozier just being an even worse jozier than jozier?
I'm guessing Jozier is salty that he lost to my team on defense in a two-pronged-attack attempt during the Hot Shot tournament. Or something. It's a legitimate issue with the game when the AI is constantly on easy mode, missing match-5's and poorly handling characters. Several hero choices are artificially sub-par options simply because the AI is completely pants-on-head with them, and other braindead options that don't require much timing or thought are just far superior. Thor, Black Panther, Punisher, etc, all come to mind, whereas timing-related heroes such as IM40, Human Torch, and Psylocke are weaker simply because of it).0 -
Kamahl_FoK wrote:I'm guessing Jozier is salty that he lost to my team on defense in a two-pronged-attack attempt during the Hot Shot tournament. Or something. It's a legitimate issue with the game when the AI is constantly on easy mode, missing match-5's and poorly handling characters. Several hero choices are artificially sub-par options simply because the AI is completely pants-on-head with them, and other braindead options that don't require much timing or thought are just far superior. Thor, Black Panther, Punisher, etc, all come to mind, whereas timing-related heroes such as IM40, Human Torch, and Psylocke are weaker simply because of it).
There's no point to talk about better AI unless you want to just retreat the moment an enemy has 5 blue AP when using Magneto. If you're not willing to put up with that, all the talk about 'stronger AI' is simply hypocrisy. Even with the 1 per turn limit you pretty much aren't going to escape a Magnetic Field lockdown, not to mention making a match 5 bypasses this limit because it's a new turn.
This game purposely avoids teaching AI from doing anything outrageously cheap because it wouldn't be very fun to immediately lose a game when even a small amount of blue AP has been collected.0 -
Phantron wrote:There's no point to talk about better AI unless you want to just retreat the moment an enemy has 5 blue AP when using Magneto. If you're not willing to put up with that, all the talk about 'stronger AI' is simply hypocrisy. Even with the 1 per turn limit you pretty much aren't going to escape a Magnetic Field lockdown, not to mention making a match 5 bypasses this limit because it's a new turn.
This game purposely avoids teaching AI from doing anything outrageously cheap because it wouldn't be very fun to immediately lose a game when even a small amount of blue AP has been collected.
I don't see how it would be a pointless effort. I'm not saying they should code Magneto to always match 5 on defense - as a software designer myself, that would be a nightmare trying to analyze the array and then make sure the AI makes the move. The way the AI handles Magneto's blue is honestly fine - the only thing I would consider tweaking on it is that it always would target 2 of the enemy's special tiles. The easiest implementation I feel that they could do with their currently operating code would be to just match up colors of abilities that would place a countdown / strike / etc tile of that same color. IM40 is ready to cast Recharge? If an obvious match of yellow exists (as in something that wouldn't have to cascade), instead make that match and don't cast recharge. Else, if no yellow matches exist, cast recharge and go on as normal. I'd like to say you also chose the one skill in the game that, with an advanced AI, the game would become unbearable. No single other skill would be anywhere near that obnoxious. The fact that I've seen Hood target two corner spots before is a sign that the AI needs just a bit of attention. Hell, even Bagman will target his own team's countdown tiles, which.. well, it's Bagman and it was a simulator event, I can't chalk that one up entirely to "bad" AI, as it seems to be working as intended there.0 -
It's not going to be hard for the AI to always make a match 5 if possible with Magneto. There are at most 64 X 63 / 2 = 2016 ways to place 2 blue tiles and that's easily within the brute force range even if you made no attempt to optimize it. In practice you can also just look for placing blue tiles within 2 tiles of another blue tile (any further than that and you can't make a match out of it). So why not teach the AI to always make a match 4/5 with Magneto? Because it'd really suck to watch the AI spam you to death like that.
They can probably put a behavior like: "Place tile close/away to (color/special/whatever)". For example Magneto's blue would be 'place tile close to blue', while Captain America's red would be "place tile away from red". That way it wouldn't be outright stupid as would be the case if you actually taught the AI how to use Magnetic Field, but it'd still make them used more intelligently. But until the game is more balanced, there's only so much you can do with the AI, because you really don't want to play against an AI that actually knows how to use Spiderman or Magneto right now.0 -
I'd like you to find me a way to hastily allow the game to process where the blue tiles would be placed. One of the most obnoxious things I've encountered in games as of late was in Duels of the Planeswalkers, where the game just waits for the AI to figure out what to do (and it can sometimes take a while). MPQ doesn't have that issue, thankfully, as it just cranks out one move after another with very little processing. I'm fine with that, and willing to keep the AI that 'dumb'. It's why I'm suggesting fixes the way I am, as they don't require extensive loops beyond what the game already has going for it. If you start incorporating complex algorithms, you're going to get some serious complaints during Lightning Rounds where every second is precious. This problem would be a larger factor in lower-grade phones. Just because you can brute force code it definitely doesn't mean that is how you should do it. If you'd like to see what I'm talking about, go do some ProjectEuler problems. They already have methods in place to just see what color matches the AI can make - a simple example is where you're only fighting Juggernaut, it will almost always match available red and green matches. Simply checking for those matches and then determining if or if not to use an ability would really help out a lot of characters.
You're also ignoring the part where the AI can only do one instance of an ability per turn. It won't be able to spam you to death, and there is a huge likelihood that it will ignore the crit tile it just made so you can get a juicy hit in. Or match blue to clear out another potential match 5.
Edit: Just stop focusing on Magneto's blue. He doesn't need help on defense, his purple has that situation covered very nicely, alongside his red... and blue still helps soften damage. The point of all this is to make less-used characters more appealing in the long haul so they don't pull off derp moves, like "Oh boy I have 6 green with HT and there are 3 green matches available, time to use it early and then match it, effectively wasting 5 AP!"0 -
Kamahl_FoK wrote:I'd like you to find me a way to hastily allow the game to process where the blue tiles would be placed
1) For each cell in the top 7x7 grid (ignore the last row and column), check for color. If it's not blue, advance the counter and repeat
2) If it's blue, check if the adjacent cell or the cell beyond that is blue. If one is, you have your first location for a tile drop.
3) Then check the adjacent cell going down and the cell below that for blue. Same as above.
4) Continue on from where you left off for the 2nd match.
Refinements could be made to avoid hitting inappropriate tiles as well as creating 4 and 5 matches if desired.
With only 49 initial data points, you're making up to 4 checks per node for just under 200 comparisons per loop. That is trivial to begin with, ignoring the fact that you'd be able to stop much earlier than that in most scenarios (as soon as you find 2 spots for a blue).0 -
I'm taking it to PM since this is getting heavily off track, but tl;dr that will only work for straight lines and maybe crosses, wording is confusing. Misses far too many other options.0
-
Kamahl_FoK wrote:I'm taking it to PM since this is getting heavily off track, but tl;dr that will only work for straight lines and maybe crosses, wording is confusing. Misses far too many other options.
I believe that's why he referred to it as a naive approach.0 -
Psykopathic wrote:Kamahl_FoK wrote:I'm taking it to PM since this is getting heavily off track, but tl;dr that will only work for straight lines and maybe crosses, wording is confusing. Misses far too many other options.
I believe that's why he referred to it as a naive approach.
I hated the time I spent working with Prolog, but I honestly think that a rules-based language is the only way to go here. Not that I'd ever want to write rules for complex multi-dimensional array manipulation, but hey, pay me enough, and I'll give you a godlike AI.0 -
I think we're still waaaay below the effort-intelligence curve though
In both algorithm design and processing power we don't need to design a ideal-playing chessmaster here. For example just having something that goes "make a match 5, if no match 5, find the 3x2 or 2x3 block with the most blues in it. place that bad boy somewhere in there" would be trivial to implement and would go a long way0 -
gamar wrote:make a match 5, if no match 5, find the 3x2 or 2x3 block with the most blues in it
If you arrange the board in 4x3 (or 3x4) grids, you would need to have at least 3 blue tiles with a finite and relatively small number of patterns and permutations of that pattern, i.e. all the inverses and mirrors. From there, it's fairly trivial to compare the pattern in the current grid to a repository of known patterns and store where the optimal placements would be, with possible additional checks for things like special tiles, incidental matches outside the 4x3 grid, etc.
More difficult would be to program what is ideal within a given scenario. It's far more difficult to program scenarios and cover them all intelligently. In some scenarios, making a match 3 to kill Psylocke's or M-Hawkeye's blue countdown may be the right play. But if there's a different match-5 play that will flat out kill that character, it's obviously the superior play. Unless... another character's non-blue countdown is about to go off, and you could set up and then make a match 4 that will kill that other player thus removing their countdown.
Heuristics and goals are not things easily expressed in the traditional if-then-else logic. That looping mechanic kills performance, which is why I was thinking of a rules based language.0 -
Keep in mind you don't have to find the perfect move. In fact playing this game would totally suck if the AI never made a mistake. It's by design supposed to mess up on purpose.
We can simply develop some general rules that are attached to abilities like:
Place tile near (color)
Place tile away (color)
Place tile over (enemy special)
Do not place tile over (your special)
For example Magneto's blue under this would be "Place tile over enemy special, near blue, and not over your own special". Captain America would be "Place tile over enemy special, away from red, and not over your own special". This wouldn't guaranteed a perfect move, but it should be better than randomly guessing a tile. Gravity Warp can be "Place tile near color of enemy special tile color".
Flame Jet can be used as having a shadow skill that costs 5 more AP than Flame Jet. It'll make the usual check to see if it should save the AP. This will increase the chance you'll have some green AP to burn after you placed it.0 -
Riggy wrote:More difficult would be to program what is ideal within a given scenario. It's far more difficult to program scenarios and cover them all intelligently. In some scenarios, making a match 3 to kill Psylocke's or M-Hawkeye's blue countdown may be the right play. But if there's a different match-5 play that will flat out kill that character, it's obviously the superior play. Unless... another character's non-blue countdown is about to go off, and you could set up and then make a match 4 that will kill that other player thus removing their countdown.
Heuristics and goals are not things easily expressed in the traditional if-then-else logic. That looping mechanic kills performance, which is why I was thinking of a rules based language.0 -
Riggy wrote:Heuristics and goals are not things easily expressed in the traditional if-then-else logic. That looping mechanic kills performance, which is why I was thinking of a rules based language.
But my point is that even complex rules and algorithms aren't actually necessary at the point where the game is now - it may take a lot of effort to design something that will pick the correct move 100% but it could (and usually does) take much less effort to design "naive" behaviors that are very likely to pick the correct move, or at least much more likely than the AI currently does0 -
GSBW's purple would be improved by leaps and bounds if the AI just chose a random tile and then placed the rest of her green in the available spots next to that random tile.0
-
mags1587 wrote:GSBW's purple would be improved by leaps and bounds if the AI just chose a random tile and then placed the rest of her green in the available spots next to that random tile.
If she could manage her purple, she'd go from being a complete joke on defense to being a top tier one. "See green? Make the biggest cross match you can on it, GOGOGO". Next turn, probably hit a sniper rifle shot.0 -
IceIX wrote:Riggy wrote:More difficult would be to program what is ideal within a given scenario. It's far more difficult to program scenarios and cover them all intelligently. In some scenarios, making a match 3 to kill Psylocke's or M-Hawkeye's blue countdown may be the right play. But if there's a different match-5 play that will flat out kill that character, it's obviously the superior play. Unless... another character's non-blue countdown is about to go off, and you could set up and then make a match 4 that will kill that other player thus removing their countdown.
Heuristics and goals are not things easily expressed in the traditional if-then-else logic. That looping mechanic kills performance, which is why I was thinking of a rules based language.
Is it possible to encapsulate those scripts and then for a given combat pass only the relevant ones into the "weighting engine"? Seems like a simple (naive ) approach to keep the engine from getting bogged down.0 -
Riggy wrote:But the actual pool of scripts inside of a given fight is fairly static. At most, you'd see 3 heroes x 3 abilities + 3 enemies x 3 abilities + (some arbitrary number of core game mechanics, such as match 4/5, post-drop look ahead). So while the number of scripts overall is definitely increasing, it seems like that number is static for a given combat.
Is it possible to encapsulate those scripts and then for a given combat pass only the relevant ones into the "weighting engine"? Seems like a simple (naive ) approach to keep the engine from getting bogged down.
It's not an impossible or unsolveable problem by any means, simply one that's a recipe for accidental oversights and the bugs attendant with them. Which would of course re-enact its little drama every time a mechanic was introduced.0 -
IceIX wrote:Riggy wrote:But the actual pool of scripts inside of a given fight is fairly static. At most, you'd see 3 heroes x 3 abilities + 3 enemies x 3 abilities + (some arbitrary number of core game mechanics, such as match 4/5, post-drop look ahead). So while the number of scripts overall is definitely increasing, it seems like that number is static for a given combat.
Is it possible to encapsulate those scripts and then for a given combat pass only the relevant ones into the "weighting engine"? Seems like a simple (naive ) approach to keep the engine from getting bogged down.
It's not an impossible or unsolveable problem by any means, simply one that's a recipe for accidental oversights and the bugs attendant with them. Which would of course re-enact its little drama every time a mechanic was introduced.
You know, if you guys need some help, my consulting fees are reasonable. Oh, wait, I see you're hiring... oh, wait, we're expecting twins in just under 2 months. Nevermind.0 -
IceIX wrote:It's not an impossible or unsolveable problem by any means, simply one that's a recipe for accidental oversights and the bugs attendant with them. Which would of course re-enact its little drama every time a mechanic was introduced.
And that is why the gods gave us property based test scaffoldings. With randomly generated data, and a set of scripts per character, it's not really all that difficult to ask the machine to double check move quality without accidental oversights. I build an actor-based distributed application that is very prone to small changes here and there affecting system stability, but this kind of testing allows us to have a very short release process.
I don't know which specific toolset you guys use to build MPQ, but I'd be surprised if there was not something you could add to replicate this kind of thing.0
Categories
- All Categories
- 44.8K Marvel Puzzle Quest
- 1.5K MPQ News and Announcements
- 20.3K MPQ General Discussion
- 3K MPQ Tips and Guides
- 2K MPQ Character Discussion
- 171 MPQ Supports Discussion
- 2.5K MPQ Events, Tournaments, and Missions
- 2.8K MPQ Alliances
- 6.3K MPQ Suggestions and Feedback
- 6.2K MPQ Bugs and Technical Issues
- 13.6K Magic: The Gathering - Puzzle Quest
- 504 MtGPQ News & Announcements
- 5.4K MtGPQ General Discussion
- 99 MtGPQ Tips & Guides
- 421 MtGPQ Deck Strategy & Planeswalker Discussion
- 298 MtGPQ Events
- 60 MtGPQ Coalitions
- 1.2K MtGPQ Suggestions & Feedback
- 5.6K MtGPQ Bugs & Technical Issues
- 548 Other 505 Go Inc. Games
- 21 Puzzle Quest: The Legend Returns
- 5 Adventure Gnome
- 6 Word Designer: Country Home
- 381 Other Games
- 142 General Discussion
- 239 Off Topic
- 7 505 Go Inc. Forum Rules
- 7 Forum Rules and Site Announcements