Consensus for TT: Buckets with Entries, or Entries with Buckets?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Buckets with Entries or Entires with Buckets

Poll ended at Fri May 20, 2022 4:51 pm

A TT has Entries, and each Entry has mulitple Buckets.
2
25%
A TT has Buckets, and each Bucket has multiple Entries.
6
75%
 
Total votes: 8

User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Consensus for TT: Buckets with Entries, or Entries with Buckets?

Post by mvanthoor »

Hi,

This may be an insanely stupid question, because it has no bearing on how a transposition table works; it's mainly a naming issue. What is the consensus about entries and buckets?

1. Does a TT have Entries, and each Entry has multiple Buckets?

OR

2. Does a TT have Buckets, and each Bucket has multiple Entries?

Even the CPW is unclear:
"This family of strategies is similar to the two-tier system, but any number of tiers (known as "buckets") can be used (typically the number is based on the size of a cacheline). The difference is that the buckets are not specific to one consideration, but rather the new entry overwrites the entry in the bucket with the lowest depth [23] . "
- A TT can have "tiers", which are known as "buckets" (which implies that a bucket is inside an entry, and thus an entry has mulitple buckets).
- The new entry overwrite the entry in the bucket (which implies that a bucket has multiple entries)

edit: the current dev-version has Entries in the TT containing multiple Buckets. Alpha 3 had Buckets, containing mulitple Entries per Bucket, so I swapped this around from option 2 to 1.
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Consensus for TT: Buckets with Entries, or Entries with Buckets?

Post by hgm »

Usual terminology is that an entry contains info about a single position. A bucket is a group of slots to which a particular position could map in the hashing process. Strictly speaking a slot is a chunk of memory, and an entry the information stored in the slot, but these terms are often used as synonyms.