MichaelSpencerJr / BenedictionGame

Windows client for the board game Benediction by Alek Erickson
0 stars 0 forks source link

Game Board Heuristics #4

Open MichaelSpencerJr opened 4 years ago

MichaelSpencerJr commented 4 years ago

Update the game board so it tracks information about coverage, bridges in progress, and possible attacks from each direction. Add new heuristics which report on each of these statistics. Allow the user to tune heuristics and watch how that changes the top ranked move.

AlekErickson commented 4 years ago

Notes from Michael's email about coverage mapping:

"I think I'd just add flags for locked pieces, and do the coverage "step" twice back to back. I like to think of it as a bunch of checkmark boxes on every board cell, for what kind of piece could legally be there after each move step. (For each combination of: stack size 1-5, movement-locked or not, and normal/bless/curse/king. 40 flags, 320 bytes) I'm counting anything above stack size five as exactly five. The change beyond what's currently written is: I'll give each piece an ID and create a set of check boxes per ID. Also include a single flag for can-be-empty. (If we start with a cursed piece surrounded on all sides with friendly pieces or blocks, that piece can't move so don't consider possibilities where that space could become empty yet.) Also include a piece dependency map. At the start, every individual source piece has its own ID with no dependencies. When new pieces are formed using splits and merges, create new IDs for the new pieces and add them to the map as descendants of the originally-involved pieces and to their parents, etc. In the future, no merges can be done which involve pieces with a dependency relationship. Also an ID index by origin, so if two pieces are combined in different ways, they stay consistent and keep using the same ID. This prevents the number of IDs we have to track from exploding as we consider permutations. Each side's projection is done separately using only their own pieces, any blocks (or blockades?) on the board, and which cells adjacent your home are empty. With the one exception of dropping pieces adjacent your home, enemy pieces don't affect legality of your moves at all. To start, we re-render the side's pieces currently on the board in checkmark form, with exactly one box checked in each cell. The progress step will be done twice (once setting movement-lock flags and once checking and clearing them) and then the result will be written out as the reachability map after n+1 turns. I plan to do this three times. For each progress step: