• Advertisement

Archived

This topic is now archived and is closed to further replies.

Can anyone guide me on AI for CPU playing tetris

This topic is 5997 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi following the recent guide to programming Tetris on Hands on Interactive forum I have decided to make my own Tetris game in DirectX and I wanted to make the computer play against a human player but I have no idea how to make the computer play a game of tetris intelligently. Could anyone give me some pointers on how to make a computer play Tetris such as * Making it play skillfully * rotating blocks to fit in gaps and any other game play strategies that us humans have. If anyone knows any websites with useful information I would appreciate it deeply Thanks in advance Dark Star UK

Share this post


Link to post
Share on other sites
Advertisement
You should start with a way of RATING the current game. Based on how high the stack is, how many lines are "Open" ( peices still can fir into ) and "Closed" ( cannot fill without removing lines ). Then you can take the current and next peice and run through as many combinations as possible looking for the best score ( as above ). At that point it''s just a matter of moving the peice into the right spot, for that just use a simple path finding algo.

Share this post


Link to post
Share on other sites

  • Advertisement