[HN Gopher] Bitboards and Connect Four
___________________________________________________________________
Bitboards and Connect Four
Author : pncnmnp
Score : 31 points
Date : 2024-02-25 21:01 UTC (1 days ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| tromp wrote:
| My connect-4 page [1] also links to this comprehensive
| explanation.
|
| [1] https://tromp.github.io/c4/c4.html
| missblit wrote:
| I used a similar technique in a university class. We were doing a
| Connect 4 bot tournament, and I wanted mine to be as optimized as
| possible.
|
| But in the end I spent all my time playing around with bitwise
| operations, so had no time left to add in multiple threads (so
| couldn't was slowed down by a factor of 4 or so) timing (so had
| to cut off the search early to not accidentally go over the
| limit), or to tweak the score heuristic.
|
| Which meant my program only got second place. Still, I think the
| teacher enjoyed it, and there were some oohs and aahs when my
| program output moves basically instantly during the tournament.
| NoboruWataya wrote:
| As I understand it, chess engines generally do something similar,
| taking particular advantage of the fact that chess boards are 8x8
| in size.
| divbzero wrote:
| Reminds me of a similar write-up about hexagonal grids posted to
| HN 10+ years ago:
|
| https://news.ycombinator.com/item?id=5809724
___________________________________________________________________
(page generated 2024-02-26 23:01 UTC)