PascalPons / connect4

Connect 4 Solver
GNU Affero General Public License v3.0
273 stars 50 forks source link

How to Generate Good Opening Book #14

Open ZZemptypoint opened 5 years ago

ZZemptypoint commented 5 years ago

How did you generate your opening book? The bigger is only 32MB, dose it enough? What are the rules for selecting positions?

MarkusThill commented 4 years ago

I just stumbled accross this issue. John Tromp already computed a 8-ply database long ago and I also computed a 12-ply database some years back: https://github.com/MarkusThill/Connect-Four

PascalPons commented 4 years ago

The opening book is stored in a TranspositionTable in which new insertions override previous positions having the same hash.

To keep the most useful position in a fixed size opening book I used the following heuristic: sort the position per number of explored node to solve before inserting them into the opening book.

The last inserted positions are more likely to be kept in the opening book. These are the most complex and the most time consuming positions to solve. It will save you a lot of time to avoid full computation. The first inserted positions are more likely to be overridden and removed from the opening book. These are the most simple and less time consuming positions to solve. You can afford recomputing them.

WilliamLauga commented 1 year ago

When i try to download the opening books here https://github.com/MarkusThill/Connect-Four/tree/master/CFour/src/openingBook I get .bat files with weird characters. Can someone help me sort this? This is urgent please help!