Forge allows you to play against the computer. The computer AI isn't spectacular but it tries to provide a decent challenge. The AI plays the most expensive card it can because generally the more expensive the card, the better the effect. Then the AI asks each card, "Should I play you now?", SpellAbility.canPlayAI() which returns true or false. If the card says, "Yes" (true), the AI plays that card.
Each card has a few lines of code in the method canPlayAI(). Shock's canPlayAI() might theoretically only allow the computer to play it if you have a 2/2 flyer or 3/2 creature. Shock might ignore "regular" 2/2 creatures. Likewise the computer will only play Wrath of God if it has less than 7 life or if it would destroy more of your creatures than its own.
The downside is that the AI doesn't make plans or long term decisions. Each card is evaluated separately, which is why the computer will never use two Shocks to kill your 4/4 creature. Generally the AI makes decent decisions but sometimes it still looks like a moron, especially when the computer kills himself with a card because that card causes damage to himself, like Char. (I think the computer won't do that with Char but I've had it happen with similar cards.)
The attacking and blocking code is very general and just attacks or blocks using very broad rules like: attack if you have the biggest attacker or block 50% of the time unless you would die. The computer does not take into account activated abilities of creatures like Royal Assassin, so the computer makes less that ideal decisions. Also since the computer doesn't play instants during combat, you will never be afraid of cards like Giant Growth.
Even though Forge's AI is simple, I'm glad to say that it can use cards like Counterspell. While the computer still isn't "smart", it at least can be very annoying with a blue control deck. And sometimes even the dumb computer can still make a few surprising plays.
I don't really know how to program AI. I wanted Forge get to up and running so I just created my own AI, which wasn't great but it worked "good enough". Maybe in the future Forge can use the min-max or alpha-beta algorithm and be a more worthy opponent.