tetrus-ai / tetrus

Tetris but in Rust. Also AI to play that.
GNU Affero General Public License v3.0
2 stars 0 forks source link

Assess effectiveness of fitness function for evolutionary algorithm #3

Open cohen990 opened 6 years ago

cohen990 commented 6 years ago

The fitness function currently seems to favour this kind of play

capture

Where the bot will drop pieces along three lanes.

The current value function is implemented in the java version of this project https://github.com/cohen990/evolution-of-tetris/blob/master/src/java/com/cohen990/TetrisPlayer.java#L28

It essentially bases the fitness on two things. The in-game score and the number of empty spaces per row.

The real problem is one of three things.

  1. The fitness function needs more information
    • The evolution function does not allow enough freedom to evolve out of local minima
    • The training needs to go on longer

requires investigation

results so far:

results

cohen990 commented 6 years ago

A better fitness function could include punishment for the empty pockets the player leaves inaccessible