Logik - algoritmy a strategie
Mastermind - algorithms and strategies
bakalářská práce (OBHÁJENO)
Zobrazit/ otevřít
Trvalý odkaz
http://hdl.handle.net/20.500.11956/200322Identifikátory
SIS: 267136
Kolekce
- Kvalifikační práce [11987]
Autor
Vedoucí práce
Oponent práce
Tůma, Jiří
Fakulta / součást
Matematicko-fyzikální fakulta
Obor
Matematika pro informační technologie
Katedra / ústav / klinika
Katedra algebry
Datum obhajoby
17. 6. 2025
Nakladatel
Univerzita Karlova, Matematicko-fyzikální fakultaJazyk
Čeština
Známka
Výborně
Klíčová slova (česky)
Logik|deterministický algoritmus|min-max|entropieKlíčová slova (anglicky)
Mastermind|deterministic algorithm|min-max|entropyPráce se zabývá popisem algoritmů řešících hru Mastermind pro libovolný počet pozic a barev. Stav hry je reprezentován dvěma způsoby, jako posloupnost pokusů s ohodno- cením a jako množina zbývajících možností na tajný kód. Vazby mezi stavy jsou v obou případech popsány v grafu a mezi oběma grafy je nalezena spojitost. Pomocí těchto grafů je definován strom, který reprezentuje nějaký algoritmus pro hru Mastermind. Dále je sestrojen obecný algoritmus sloužící k popisu konkrétních algoritmů. Ve třetí kapitole jsou popsány tři deterministické algoritmy, které hru řeší. Jde o algoritmy Min-max, Max entropy a Most parts. Nakonec jsou tyto metody implementovány a otestovány na hře Mastermind o čtyřech pozicích a šesti barvách.
This thesis describes algorithms solving the game Mastermind for arbitrary number of positions and colours. The state of the game is described in two ways, as a sequence of codes with evaluations and as a set of codes which could be the secret code. Both sets of state representations are described in a graph and we show the relation between these graphs. Using that, a tree that represents a particular algorithm for the game Mastermind is defined. Next, we construct a general algorithm solving the game which we use for describing particular methods. In the third chapter, three deterministic algorithms are described. They are called Min-max, Max-entropy and Most parts. Finally, we implement these algorithms and show their results in Mastermind with four positions and six colours.
