TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

XORShift for Magic Bitboards

47 pointsby chilipepperhott5 months ago

4 comments

flohofwoe5 months ago
Also generally known as LFSRs (Linear Feedback Shift Registers): <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Linear-feedback_shift_register" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Linear-feedback_shift_register</a>. One advantange is that they can be easily implemented in hardware (and then very cheaply implemented in emulators). For instance the noise generators in audio chips of 80s home computers were typically an LFSR with around 16 bits of state.
PaulHoule5 months ago
Was just reading about this because I am writing a chess engine. I am using somebody else&#x27;s move generator, I am not sure how it works but it is not front of mind because it is spending most time evaluating and managing transposition tables according to the profiler, I can at least 5x those and maybe I will worry about another microoptimisation then. But really move ordering can make a 10x change and I am going to iterative deepening, pv, killer heuristic and such.
评论 #42594624 未加载
teo_zero5 months ago
Is there any particular reason why this straightforward implementation of a well-known PRNG (published by Marsaglia 20 years ago) is worth being linked from HN&#x27;s first page?
评论 #42596540 未加载
DennisL1235 months ago
tl;dr: it‘s a fast and simple (~5 LOCs) PRNG that has garnered some attraction in the computer chess community.