Better HN
topnewbestaskshowjobs
Log inSign up

gavinlilly

6 karma · joined Sep 14, 2026 (2mo ago) · 2 submissions

Submissions

comment 1mo ago · link · parent

I wonder how capable current AIs are with the "silent defense" variant of Stratego [1]? The article states the high level of uncertainty presents a challenge. With silent defense the uncertainty is even higher.

[1] https://www.hasbro.com/common/instruct/Stratego.PDF "When an attack is made, the attacker is the only player who has to declare the number of his or her piece. The defender does not reveal the number of his or her piece, but resolves the attack by removing whatever piece has a lower number from the gameboard. Players keep their own captured pieces. Exception: when a Scout attacks, the defender must reveal the number of his or her piece.

comment 2mo ago · link · parent

If contention is expected, would it be better to first perform a relaxed read before the exchange? For example:

  auto lock() noexcept -> void {
      auto backoff = 1;
      do {
          while (locked_.load(std::memory_order_relaxed)) {
              for (auto i = 0; i < backoff; ++i) _mm_pause();
              backoff = backoff < 64 ? backoff << 1 : 64;
          }
      } while (locked_.exchange(true, std::memory_order_acquire);
  }