AI matching question
cooperbigdaddy
Posts: 408 Mover and Shaker
I understand the AI will always match a 5-line or a 4 if there are ones available.
But besides that, how do they decide what to match? I would think they would always want to match their strongest color, right? But it seems whenever I play with C4rol, they hardly ever match their strongest color. But in my mind, C4rol's green would be amazing against AI because they SHOULD be matching their color anytime there's a possible match that isn't a different colored 4/5 line match.
Am I wrong about this?
But besides that, how do they decide what to match? I would think they would always want to match their strongest color, right? But it seems whenever I play with C4rol, they hardly ever match their strongest color. But in my mind, C4rol's green would be amazing against AI because they SHOULD be matching their color anytime there's a possible match that isn't a different colored 4/5 line match.
Am I wrong about this?
0
Comments
-
The AI considers all colors that power an ability equal and randomly chooses a match from those colors.1
-
The AI typically likes to match the colors you need the most
Me: "Okay I have 3 yellow AP for IM40.. oh there's a match 3"
AI: ::matches yellow... Cascade into several 5matches::
Me: ::Throws phone and goes to Taco Bell::6 -
This article describes how it worked 1.5 years ago:
http://www.demiurgestudios.com/engineering/a-worthy-opponent/
I'm not sure if it has changed since then.
4 -
I've thought for a while that even if the AI doesn't work specifically to mess with the player, it would make sense for it to "choose" a power that it wants to cast, and always give that match color preference until it fires the power, then pick a new power/color, repeat.
0 -
The algorithm is weighted towards matching colours that will charge up an ability, but a match four will take precedence, even if the colour is useless for the AI team. If there are two matches that will charge abilities, it will pick one at random.
Also, I don't think it is smart enough to notice that an ability is passive and doesn't actually need any AP. You can see this when e.g. Luke Cage decides to match away his protect tile when there are other matches available.
1 -
Tell you what, the enemy AI has grown very good at avoiding traps and Wasp's timer.
I had a board with Spider Woman's traps on it. 4 matches would set one off and one match would do nothing. There were no other possibilities.
They chose not to match the trap. So I had to. And the board reshuffled and hid them all 8I
0 -
Dragon_Nexus said:Tell you what, the enemy AI has grown very good at avoiding traps and Wasp's timer.
I had a board with Spider Woman's traps on it. 4 matches would set one off and one match would do nothing. There were no other possibilities.
They chose not to match the trap. So I had to. And the board reshuffled and hid them all 8I1 -
AI logic:
- Is there an in-line match-5 available? Take it. Otherwise...
- Is there a match-4 available? Take it. Otherwise...
- Have I used my Team-Up ability yet? If not, pick randomly between my "strong" colors and TU matches... aka colors that any of my characters deal more match damage in or any TU match, passive powers or not. Otherwise...
- Make a match-3 using one of my "strong" colors - colors that match up with the colors the character has higher match damage in (for Juggernaut as an example, make either a green, red, or black match or for Wasp, make a yellow, blue, or black match). If I have used my Team-Up ability, TU matches are now lower priority than "strong" matches. Otherwise...
- Pick any available match-3s available. If I have used my Team-Up ability, include TU matches.
1 -
Smudge said:AI logic:
- Is there an in-line match-5 available? Take it. Otherwise...
- Is there a match-4 available? Take it. Otherwise...
- Have I used my Team-Up ability yet? If not, pick randomly between my "strong" colors and TU matches... aka colors that any of my characters deal more match damage in or any TU match, passive powers or not. Otherwise...
- Make a match-3 using one of my "strong" colors - colors that match up with the colors the character has higher match damage in (for Juggernaut as an example, make either a green, red, or black match or for Wasp, make a yellow, blue, or black match). If I have used my Team-Up ability, TU matches are now lower priority than "strong" matches. Otherwise...
- Pick any available match-3s available. If I have used my Team-Up ability, include TU matches.
0 -
Jaedenkaal said:Smudge said:AI logic:
- Is there an in-line match-5 available? Take it. Otherwise...
- Is there a match-4 available? Take it. Otherwise...
- Have I used my Team-Up ability yet? If not, pick randomly between my "strong" colors and TU matches... aka colors that any of my characters deal more match damage in or any TU match, passive powers or not. Otherwise...
- Make a match-3 using one of my "strong" colors - colors that match up with the colors the character has higher match damage in (for Juggernaut as an example, make either a green, red, or black match or for Wasp, make a yellow, blue, or black match). If I have used my Team-Up ability, TU matches are now lower priority than "strong" matches. Otherwise...
- Pick any available match-3s available. If I have used my Team-Up ability, include TU matches.
Edit: I could be mistaken of course, and I'll gladly admit when I'm wrong, but I have had numerous situations where both a match-4 and an in-line match-5 are available, and I have never seen the AI take the match-4.0 -
According to the article linked above, which is the best information we have, the AI only looks for match-4s. Sometimes it gets match-5s, but only because they are also match-4s.
If the AI was programmed to look for match-5s, I would expect it to find T- and L- matches, as well; there's no reason to specifically exclude those if you're coding it to look for match-5s specifically, whereas it makes perfect sense if you're only programming it to look for match-4s.1 -
Fair's fair. I'm not admitting defeat on this point until I see the AI bypass a match-5 in-line in favor of a match-4 when both exist, however. The article is almost 2 years old at this point; while I've always held it to be authoritative, to think that they haven't updated the code to prefer a match-5 in-line over a match-4 in that time is possible, but it seems unlikely to me.
I fully understand that the AI doesn't "see" the T and L shapes since it only checks a single axis, but to update it to check from 1 tile behind to 2 tiles behind the swap for the total number of tiles matched in one line isn't much of a code change in nearly 2 years' time based on the code as described.0 -
Smudge said:AI logic:
- Is there an in-line match-5 available? Take it. Otherwise...
- Is there a match-4 available? Take it. Otherwise...
- Have I used my Team-Up ability yet? If not, pick randomly between my "strong" colors and TU matches... aka colors that any of my characters deal more match damage in or any TU match, passive powers or not. Otherwise...
- Make a match-3 using one of my "strong" colors - colors that match up with the colors the character has higher match damage in (for Juggernaut as an example, make either a green, red, or black match or for Wasp, make a yellow, blue, or black match). If I have used my Team-Up ability, TU matches are now lower priority than "strong" matches. Otherwise...
- Pick any available match-3s available. If I have used my Team-Up ability, include TU matches.
Don't know about you guys, but I feel like I'm getting good at guessing what matches it will make. Especially when the Hulk or baby groot is playing for me.
0 -
The article jamesh linked above states:the criteria for selecting a swap are:I have never seen the AI take a match-4 when there is a match-5 available to it.
- Number of matched tiles in a straight line, up to 4
- Does the match charge an ability on the computer's team?
I remember reading somewhere (it might have been that article, I'm not reading it again to look for this info) that the AI looks for the match that gives it the most AP, searching by rows and columns (thus ignoring T- and L-shaped matches), possibly ignoring the gain from the row clearing of a match-4. Therefore, since 5 in a row gives the most AP, it will choose that first, then a match-4, and lastly a match-3.
0 -
The relevant part of the article is:
"This scoring system means that the criteria for selecting a swap are:- Number of matched tiles in a straight line, up to 4
- Does the match charge an ability on the computer's team?
That's it. That's all the logic. "
0 -
We could probably suss this out... I'd always thought it was totally deterministic and used the same search pattern it does to resolve countdown tiles... we just need someone less lazy than I am to post a board, AP totals and the move made (along with any powers in order of use)... and we need a lot of them, probably something better addressed in a different forum altogether.0
-
*moving this over to Tips and Guides as it's actually useful information for people to know*0
-
Jaedenkaal said:According to the article linked above, which is the best information we have, the AI only looks for match-4s. Sometimes it gets match-5s, but only because they are also match-4s.
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
- 505 MtGPQ News & Announcements
- 5.4K MtGPQ General Discussion
- 99 MtGPQ Tips & Guides
- 424 MtGPQ Deck Strategy & Planeswalker Discussion
- 299 MtGPQ Events
- 60 MtGPQ Coalitions
- 1.2K MtGPQ Suggestions & Feedback
- 5.7K 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