If the random component would be deterministic (ok, only needs a seeded Random), you could implement an AI that at least
can brute force a few rounds ahead, to see a favorable current move. (ending up with the highest card collection, not beeing locked, and having high cards adjacent)
Then repeat it for every move.
Even if the random event cannot be foreseen, there are not a lot of possibilities for something happening randomly.
On every empty Tile either a '2' or a '4' (If I saw that right) can spawn. That means in the beginning there are only 32 possibilities for something happening. That means you could simply brute force every case there, too.
Also, the more Tiles that are obstructed, the less possibilities there are, making it easier for the brute force algorithm in late game