Beating Blitz: Building a Kick-@#! Bejeweled Blitz Bot with Python by Spencer Seidel

Beating Blitz: Building a Kick-@#! Bejeweled Blitz Bot with Python by Spencer Seidel

Author:Spencer Seidel [Seidel, Spencer]
Language: eng
Format: epub
Published: 2015-12-02T23:00:00+00:00


Finding Moves, Part 2

Okay, so now that we have a more effective grid cell-matching algorithm in place, let's think more carefully about how to pick our moves.

Halves

Let's get a little smarter about how to choose the best moves. Often, I will execute two or three moves rapidly when they are in different parts of the grid. Usually, I'll spot a move on 1 side of the grid and immediately look to the opposite side for another move to execute rapidly. Same with the top and bottom half of the screen.

Instead of finding 1 move per game loop, let's try to find 2. We'll create an algorithm that tries to find a move on one half of the board and another on the other half of the board, first horizontally and then vertically. If 2 moves can't be found in that way, we'll just execute the first move we found.

Here's what it looks like:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.