TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Bitboards and Connect Four

38 点作者 pncnmnp大约 1 年前

4 条评论

tromp大约 1 年前
My connect-4 page [1] also links to this comprehensive explanation.<p>[1] <a href="https:&#x2F;&#x2F;tromp.github.io&#x2F;c4&#x2F;c4.html" rel="nofollow">https:&#x2F;&#x2F;tromp.github.io&#x2F;c4&#x2F;c4.html</a>
missblit大约 1 年前
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.<p>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&#x27;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.<p>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大约 1 年前
As I understand it, chess engines generally do something similar, taking particular advantage of the fact that chess boards are 8x8 in size.
divbzero大约 1 年前
Reminds me of a similar write-up about hexagonal grids posted to HN 10+ years ago:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5809724">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5809724</a>