Progress: Find piece modification + Tests complete!

What has been done today:

Changing the finding of the piece.
By the original plan, the piece is found on the second step, thus resulting in missing of a step, which slightly dampens the agents chances. This is only one step, and so this is a minute problem. The main problem is comparing the piece against the previous step, which checks the entire board for differing bits. A problem is that although the piece may fall, the top of the piece in the current step intersects the bottom of the piece in the previous step for all pieces but I-piece. This makes finding the piece troublesome.

The solution to this, is to check the top 3 rows of the field against the previous observation on the first step and every step requiring the finding of a new piece (when the old one drops). If there is no previous observation (1st step), check the observation for ‘1’ bits (i.e. comparing it against a ‘0’ bit dummy observation). Then, using the data of differing bits, locate the piece and return it’s y-Pos.

Tests done!
I believe I have written fairly comprehensive tests that test all of the current major (disregarding gets and sets) functions. More functions may be created as development progresses, but I don’t see any further ones at this point. The tests are all fully working (may be erroneous however, this’ll be sorted when testing) and should be Jumbled when the tests are all passing. All that is left now is to write the code for the program!

Leave a Reply

Your email address will not be published. Required fields are marked *