How can I play Dominion by myself (like solitaire)?
Probably the best way to make a bot to play against is to not make it have a deck at all, just every other turn make it take a duchy and on the other turns make it randomly take an attack card and do it's effect (only bother with the effect that effects you for the bot doesn't have a deck) 
You should check out the game Ascension, it is a deck building game like dominion, but with a viable built in solitaire variant.