I'm trying to make a block puzzler type game, similar to Tetris but top-down on a grid. It's going great so far.
I was originally going to avoid doing any kind of AI opponent, focusing mostly on just a simple single-player story mode and multiplayer, but now I'm wondering if it'd be possible to make an AI and where I might start looking to get it to do simple things. Moving the AI block wouldn't be too difficult if it's using a grid, but having the AI figure out where to put its blocks build the pile and make a line is where I'm thinking the difficulty would be.
Here's what the basic game looks like, with the solid block being the piece to be placed, and the small blobs being the pieces that have already been placed:
So here's where the AI comes in. Lets say he scans where blocks are and wants to "attach" his block to the pile, he has three possible options of where he COULD put this block, not including just putting it in the middle of nowhere. What would be a way to get the AI to scan available spots that this block might fit, while also knowing it'll be attached to the current block pile? Is this a bit beyond my scope?
Thanks in advance for any advice.