Added: 1 month ago
From: Bisqwit
Views: 161
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (7)

Sign In or Sign Up now to post a comment!
  • @oEQjet It would be interesting to see an AI this efficient configured to favor four-line clears. But whenever I play, I always get what resemble canyon walls trying to score a tetris. Maybe frequent doubles and the occasional triple is actually smarter than waiting for that stupid straight-line piece that never comes when you need it?

  • Wow, that AI sure knows how to play Tetris! I'll look at the code when I get a chance, but I have a question in the meantime:

    For me, the best game AI is not always the most efficient. Is the difficulty level of this AI scalable for actual gameplay? It seems that a human player would have a rather tough time prevailing against this. :-)

  • @jwcsh Yes. The "ply" affects the difficulty level. 1-ply only considers the optimal placement for the current piece, disregarding completely what might come after. 2-ply also considers the next piece, and so on. The algorithm can also be tweaked by adjusting the score coefficients; from what I understand, pretty much any tweaking to the coefficients (the "enum" penalties in AI_Run()) may worsen the AI performance, by making it disproportionally focus on particular traits in the block placement.

  • With the AI constantly looking to clear lines, that sort of made sense with the pentaminos. With tetraminos, they should be looking for 4 line scores.

  • @oEQjet The AI aims for long-term survival. A 1-ply version in non-deathmatch mode casually survives about 650000 lines by average. (This version is 3-ply; I have not profiled how long it survives by average because it's much slower.) Aiming for 4-line scores might max out the score faster, but it also reduces chances of survival, because the pieces are after all granted randomly. Line pieece~!

  • @Bisqwit In heads up mode against another AI, 4 line scores help eliminate the opponent! Then again I guess it's all down to your objectives. It sure does survive!

    What's the score for clearing 5 lines? That would be absurdly hard to do.

  • @oEQjet My pentomino set does not include the 5-block line piece that would be required for 5-line clear. Neither is there a score defined for 5-line clears. It should however be 1100 or 1200, times level plus bonuses. (Values for 1,2,3,4 line clears are 100, 300, 500 and 800 respectively.) You are right about eliminating the opponent. However, when playing against an equal opponent, it would make bad demo if both players died before 30 lines.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more