Order of operations

AXP_isme
AXP_isme Posts: 809 Critical Contributor
i noticed something odd while I was playing a seed team in the lightning round starting at 0600 BST. The AI turn started, iron man fired his yellow, the board reshuffled then doom fired his purple. IM35’s yellow doesn’t affect the board configuration which must mean the board state was invalid (no available matches) at the end of the player turn. I know that the AI fires powers in a specific, colour defined, order. I also imagine there are actions that occur at the beginning of a turn, like resolving CDs, before any powers are fired. What surprised me was that the board shuffle happened between AI powers when none of them affected the configuration of tiles. 

Am I missing something? Is my mind playing tricks on me early in the morning? Please can you kind forum-goers enlighten me and save me from my ignorance. 

Ta

Comments

  • Daiches
    Daiches Posts: 1,252 Chairperson of the Boards
    edited June 2018
    Board reshuffle is a state-based-action. It can and will happen in between different powers resolving. But the case you describe shouldn't cause an illegal board state.
  • TPF Alexis
    TPF Alexis Posts: 3,826 Chairperson of the Boards
    edited June 2018
    I've seen it wait after I used up the last match until firing all AI powers and then shuffling right before their actual move, but I've never seen it do that in between two AI powers that didn't change the board state.

    I guess it's just like Dayv says: "We have always been at war with order of operations." ;)
  • AXP_isme
    AXP_isme Posts: 809 Critical Contributor
    That’s what I was thinking. There’s no part of IM35’s yellow that causes changes to the board configuration. If it was invalid after he fired the power it was also invalid before so the order of operation doesn’t seem logical. I suppose there could be some new power set incoming that might alter the board on firing an enemy power but that seems a bit of a stretch. 
  • professorplum9
    professorplum9 Posts: 133 Tile Toppler
    It's so you'll feel better when you wait for the board to be in a state where there are no yellow matches to make before you fire IM35 yellow only to have it reshuffle as you finish your turn after you make the last available match and all your CDs end up right next to each other (or at the very least next to other yellow tiles). This is the AIs way of saying it can happen to me so don't feel bad when it happens to you. It cares :wink:

  • CNash
    CNash Posts: 952 Critical Contributor
    The AI doesn't look at the board before deciding what powers it's going to fire on its turn. In fact it doesn't consider anything outside of what AP it has and what it can use that AP for. It doesn't look
    at its own health, or your team's health. It will "queue up" powers that it's able to fire, and execute those in a specific colour order at the start of its turn. Essentially it's blind-firing everything, not caring what the powers are or what they do. I remember a while ago, if you lost a match to the AI it would continue firing its queue of powers in the window between KOing you and the "Defeat" banner appearing.

    Order of operations weirdness, or some kind of race condition, might be causing the effect described here - the AI's powers queue and the game's board state check must occur at almost the same time. So occasionally the AI can fire its first power before anything else happens.