A Comparative Study of Parallel Search Techniques in a Chess Engine: Young Brothers Wait Concept or Lazy SMP?
2025 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE credits
Student thesisAlternative title
En Jämförande Studie av Parallella Söktekniker i en Schackmotor : Young Brothers Wait Concept eller Lazy SMP? (Swedish)
Abstract [en]
An important aspect to consider when creating a chess engine is the choice of parallel search algorithm. Two of the most common approaches are Young Brothers Wait Concept (YBWC) and Lazy Symmetric Multiprocessing (SMP). During the research process, it became apparent that while quite a few papers have been written about Chess Engines (CEs) with one of the two algorithms, very little exists regarding comparing parallel search techniques of CEs head- to-head. This project aims to determine how YBWC and Lazy SMP compare in terms of scalability, speedup, and playing strength. To accomplish this, the popular open source chess engine Crafty was modified to use Lazy SMP instead of YBWC. Both versions were then tasked with searching for the best move from 30 different positions 50 times each to determine the speedup from increasing thread-counts. They also played 30 matches against four engine opponents of different strengths to calculate the Elo rating of both versions of Crafty at different thread-counts. The findings of this project indicate that neither algorithm consistently outperforms the other. While each algorithm excels in specific scenarios, their strengths and weaknesses depend on resource availability. These results suggest that YBWC performs better than Lazy SMP when utilising a large amount of computer resources. Conversely, Lazy SMP outperforms YBWC when operating with limited resources. YBWC’s structured approach to organising resource utilisation gives it an advantage in resource-rich environments, but it becomes a drawback when resources are scarce. On the other hand, Lazy SMP’s more chaotic, direct approach works well in low- resource situations, but becomes harder to manage as resource availability increases. The lack of previous research could make the findings valuable for other chess engine developers when selecting chess algorithms, particularly when deciding between Lazy SMP and YBWC.
Abstract [sv]
En viktig aspekt att ta hänsyn till när man skapar en schackmotor är valet av av parallellsökalgoritm. Två av de vanligaste metoderna är Young Brothers Wait Concept (YBWC) och Lazy Symmetric Multiprocessing (SMP). Under forskningsprocessen blev det uppenbart att trots att en del artiklar har skrivits om schackmotorer med en av de två algoritmerna, så finns det väldigt lite som direkt jämför parallella söktekniker för schackmotorer med varandra. Detta projekt försöker avgöra hur YBWC och Lazy SMP står sig mot varandra gällande skalbarhet, hastighet och spelstyrka. För att åstadkomma detta användes den modifierades en populär schackmotor med öppen källkod vid namn Crafty för att använda Lazy SMP i stället för YBWC. Båda versionerna fick sedan söka efter det bästa draget från 30 olika positioner 50 gånger vardera för att avgöra hur mycket snabbare de blir med ökat antal trådar. De spelade även 30 matcher mot fyra schackmotorer av olika styrka för att beräkna Elo-värdet för de båda versionerna av Crafty vid olika antal trådar. Resultaten av detta projekt visar att ingen av algoritmerna konsekvent överträffar den andra. Även om varje algoritm utmärker sig i specifika scenarier beror deras styrkor och svagheter på resurstillgången. Dessa resultat tyder på att YBWC presterar bättre än Lazy SMP när en stor mängd datorresurser utnyttjas. Omvänt presterar Lazy SMP bättre än YBWC när man arbetar med begränsade resurser. YBWC:s strukturerade sätt att organisera resursutnyttjandet ger den en fördel i resursrika miljöer, men blir en nackdel när resurserna är knappa. Lazy SMP:s mer kaotiska och direkta tillvägagångssätt fungerar å andra sidan bra i resurssvaga situationer, men blir svårare att hantera när resurstillgången ökar. Avsaknaden av tidigare forskning kan göra resultaten värdefulla för andra schackmotorutvecklare när de väljer schackalgoritmer, särskilt när de väljer mellan Lazy SMP och YBWC.
Place, publisher, year, edition, pages
2025. , p. 94
Series
TRITA-EECS-EX ; 2025:17
Keywords [en]
Chess Engine, Young Brothers Wait Concept, Lazy SMP, Parallel Search, Scalability, Elo Rating
Keywords [sv]
Schackmotor, Young Brothers Wait Concept, Lazy SMP, Parallelsökning, Skalbarhet, Elorating
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-361685OAI: oai:DiVA.org:kth-361685DiVA, id: diva2:1947313
Supervisors
Examiners
2025-03-312025-03-252025-03-31Bibliographically approved