Data-Driven Soundtracks for Chess
Total Page:16
File Type:pdf, Size:1020Kb
Data-Driven Soundtracks for Chess Stefan Höller MASTERARBEIT eingereicht am Fachhochschul-Masterstudiengang Interactive Media in Hagenberg im November 2019 © Copyright 2019 Stefan Höller This work is published under the conditions of the Creative Commons License Attribution- NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)—see https:// creativecommons.org/licenses/by-nc-nd/4.0/. ii Declaration I hereby declare and confirm that this thesis is entirely the result of my own original work. Where other sources of information have been used, they have been indicated as such and properly acknowledged. I further declare that this or similar work has not been submitted for credit elsewhere. Hagenberg, November 26, 2019 Stefan Höller iii Contents Declaration iii Abstract viii Kurzfassung ix 1 Introduction 1 1.1 Motivation . .1 1.2 Problem Statement . .1 1.3 Document Structure . .2 2 Chess 3 2.1 Principles and Metrics . .3 2.1.1 Move . .3 2.1.2 Attacks . .3 2.1.3 Castling . .5 2.1.4 Blunder . .5 2.1.5 Material . .5 2.1.6 Mobility . .6 2.1.7 Initiative . .6 2.1.8 Pawn Structure . .7 2.1.9 Passed Pawn . .7 2.1.10 Development . .7 2.1.11 Imbalances . .7 2.1.12 Phases of Chess . .7 2.2 Chess Engines Overview . .8 2.2.1 First Mechanical Chess Players . .8 2.2.2 Shannon’s Chess Engine Definition . 10 2.2.3 Chess Engines Pursuit to Gain Strength . 11 2.3 Chess Engine Principles . 12 2.3.1 Board Representation . 12 2.3.2 Static Evaluation Function . 13 2.3.3 Look-Ahead Procedure . 13 2.3.4 Opening Book . 14 2.3.5 End Game . 15 2.4 Stockfish . 15 iv Contents v 2.5 Universal Chess Interface . 15 2.6 Chess Notations . 16 2.7 Centipawn . 16 2.8 Score . 17 2.9 Elo Rating . 17 2.10 Summary . 17 3 Adaptive Soundtracks 19 3.1 Audio Programming Languages . 19 3.2 FMOD . 21 3.3 Choosing the Appropriate Audio Program . 22 3.4 Controlling Adaptive Soundtracks . 22 3.5 Audio Synthesis for Chess . 24 3.5.1 Reunion . 24 3.5.2 Reunion2012 . 25 3.5.3 Music for 32 Chess Pieces . 26 3.6 Summary . 26 4 Data-Driven Soundtracks for Chess 28 4.1 Requirements . 28 4.2 Limitations . 30 4.3 First Soundtrack Design . 30 4.3.1 Samples . 31 4.3.2 Audio Tracks . 31 4.3.3 Leading Player . 31 4.3.4 Intensity . 32 4.3.5 Possible Moves . 32 4.3.6 Is Check . 32 4.3.7 Move Category . 32 4.3.8 Attackers Count . 33 4.4 Second Soundtrack Design . 33 4.4.1 Samples . 33 4.4.2 Base Layers . 34 4.4.3 Fluctuation . 34 4.4.4 Unopposed Threats . 34 4.4.5 Mistake . 35 4.4.6 Is Capture . 35 4.4.7 Possible Moves . 35 4.4.8 Attack/Defense Relation . 35 4.5 Summary . 35 5 Implementation 37 5.1 Architecture . 37 5.1.1 Database . 40 5.2 Details on the Chess Analysis Tool . 40 5.2.1 Open a Chess Game . 40 5.2.2 Connect to Stockfish . 40 Contents vi 5.2.3 Main Program for Chess Analysis . 41 5.2.4 Computing Score and Best Move . 42 5.2.5 Categorize Difference between Best and Actual Move . 43 5.2.6 Analyzing Captures . 44 5.2.7 Detect Attacks . 45 5.2.8 Detect Guards . 45 5.2.9 Detect Unopposed Threats . 46 5.2.10 Determine the Number of Possible Moves . 46 5.2.11 Determine the Number of Threats . 47 5.2.12 Parameter Definitions . 47 5.3 Details on the FMOD Studio Event . 51 5.4 Details on the Chess Music Tool . 52 5.4.1 Loading a Game into Chess Music Tool . 52 5.4.2 Load FMOD Bank . 53 5.4.3 Initialize FMOD Parameters . 53 5.4.4 Fluctuating Score . 54 5.5 Summary . 54 6 Evaluation 56 6.1 Heuristic Evaluation . 56 6.1.1 Method . 56 6.1.2 Adjusted Approach . 58 6.1.3 Result . 59 6.1.4 General Feedback . 62 6.2 Chess Metric Ranking . 62 6.3 Chess Metric Evaluation . 63 6.3.1 Score and Score Change . 64 6.3.2 Threats . 65 6.3.3 Mistakes . 66 6.3.4 Captures . 68 6.3.5 Legal Moves . 70 6.4 Real-Time Evaluation . 71 6.5 Summary . 72 7 Conclusion 73 7.1 Evaluation Results . 73 7.2 Future Prospects . 75 7.3 Conclusion . 76 A Technical Details 77 A.1 Project Directory . 77 B CD-ROM/DVD Contents 79 B.1 PDF-Files . 79 B.2 Project . 79 B.3 Miscellaneous . 80 Contents vii References 81 Literature . 81 Audio-visual media . ..