=== INITIALIZING PIECE RECOGNIZER ===
Model loaded successfully from: /Users/chaulmark/Library/Developer/Xcode/DerivedData/ChessPrism-eefzflqwaismgqgjoetabiujjcgr/Build/Products/Debug/ChessPrism.app/Contents/Resources/ChessPieceClassifier.mlmodelc
AddInstanceForFactory: No factory registered for id <CFUUID 0x600003113780> F8BB1C28-BAE8-11D6-9C31-00039315CD46
=== SCAN BUTTON PRESSED ===
Captured image: (919.0, 670.0)
Analyzing board position...
=== ANALYZING BOARD ===

Classification results for BoardPosition(file: 0, rank: 0):
- white_rook: 0.9999322
- black_rook: 6.774748e-05
- white_king: 7.3981004e-09

Classification results for BoardPosition(file: 1, rank: 0):
- white_knight: 1.0
- black_knight: 1.1934526e-17
- white_bishop: 1.2330606e-24

Classification results for BoardPosition(file: 2, rank: 0):
- black_knight: 0.9997147
- black_rook: 0.00027883475
- black_bishop: 5.89228e-06

Classification results for BoardPosition(file: 3, rank: 0):
- white_king: 0.9983813
- white_rook: 0.0010669202
- white_knight: 0.00041843182

Classification results for BoardPosition(file: 4, rank: 0):
- white_king: 1.0
- black_king: 6.379774e-10
- black_bishop: 1.0737971e-14

Classification rejected at BoardPosition(file: 4, rank: 0):
Top result: white_king (1.0)
Second best: black_king (6.379774e-10)
Confidence ratio: 8343953.0
Adjusted confidence: 1.0

Classification results for BoardPosition(file: 5, rank: 0):
- white_rook: 0.58311313
- white_king: 0.4168078
- black_bishop: 7.6859214e-05

Classification rejected at BoardPosition(file: 5, rank: 0):
Top result: white_rook (0.58311313)
Second best: white_king (0.4168078)
Confidence ratio: 1.3989973
Adjusted confidence: 0.58311313

Classification results for BoardPosition(file: 6, rank: 0):
- white_knight: 1.0
- black_knight: 1.3012843e-15
- white_bishop: 4.952984e-22

Classification results for BoardPosition(file: 7, rank: 0):
- white_rook: 0.9992894
- black_rook: 0.0007105772
- white_king: 5.2344448e-11

Classification results for BoardPosition(file: 0, rank: 1):
- white_pawn: 1.0
- white_king: 7.0033545e-12
- black_pawn: 1.2942099e-12

Classification results for BoardPosition(file: 1, rank: 1):
- white_pawn: 1.0
- black_pawn: 1.6859661e-13
- black_bishop: 2.603961e-19

Classification results for BoardPosition(file: 2, rank: 1):
- white_rook: 0.89660114
- white_king: 0.086419925
- white_knight: 0.016850794

Classification rejected at BoardPosition(file: 2, rank: 1):
Top result: white_rook (0.89660114)
Second best: white_king (0.086419925)
Confidence ratio: 10.374921
Adjusted confidence: 0.89660114

Classification results for BoardPosition(file: 3, rank: 1):
- black_knight: 0.9998835
- black_pawn: 7.848534e-05
- black_rook: 3.68113e-05

Classification results for BoardPosition(file: 4, rank: 1):
- white_king: 0.7772867
- white_rook: 0.21319194
- white_knight: 0.008732727

Classification rejected at BoardPosition(file: 4, rank: 1):
Top result: white_king (0.7772867)
Second best: white_rook (0.21319194)
Confidence ratio: 3.6459458
Adjusted confidence: 0.7772867

Classification results for BoardPosition(file: 5, rank: 1):
- white_pawn: 1.0
- black_pawn: 1.3066745e-13
- black_bishop: 3.320688e-20

Classification results for BoardPosition(file: 6, rank: 1):
- white_pawn: 1.0
- black_pawn: 2.7381055e-16
- black_bishop: 1.1745517e-21

Classification results for BoardPosition(file: 7, rank: 1):
- white_pawn: 1.0
- black_pawn: 7.737975e-12
- black_bishop: 1.797723e-18

Classification results for BoardPosition(file: 0, rank: 2):
- black_rook: 0.99889785
- black_knight: 0.0009475333
- black_bishop: 0.00013781422

Classification results for BoardPosition(file: 1, rank: 2):
- white_bishop: 1.0
- white_knight: 5.039787e-13
- black_bishop: 2.1238877e-13

Classification results for BoardPosition(file: 2, rank: 2):
- white_pawn: 1.0
- black_pawn: 5.417135e-12
- black_bishop: 6.220996e-21

Classification results for BoardPosition(file: 3, rank: 2):
- black_knight: 0.83722544
- white_knight: 0.1627746
- black_bishop: 2.8136882e-19

Classification rejected at BoardPosition(file: 3, rank: 2):
Top result: black_knight (0.83722544)
Second best: white_knight (0.1627746)
Confidence ratio: 5.143461
Adjusted confidence: 0.83722544

Classification results for BoardPosition(file: 4, rank: 2):
- black_knight: 0.81991595
- black_rook: 0.17813577
- black_pawn: 0.0017957124

Classification rejected at BoardPosition(file: 4, rank: 2):
Top result: black_knight (0.81991595)
Second best: black_rook (0.17813577)
Confidence ratio: 4.6027555
Adjusted confidence: 0.81991595

Classification results for BoardPosition(file: 5, rank: 2):
- white_rook: 0.8535699
- white_king: 0.124892734
- white_knight: 0.02131261

Classification rejected at BoardPosition(file: 5, rank: 2):
Top result: white_rook (0.8535699)
Second best: white_king (0.124892734)
Confidence ratio: 6.834418
Adjusted confidence: 0.8535699

Classification results for BoardPosition(file: 6, rank: 2):
- black_knight: 0.94812983
- black_rook: 0.051835023
- black_pawn: 3.4919147e-05

Classification rejected at BoardPosition(file: 6, rank: 2):
Top result: black_knight (0.94812983)
Second best: black_rook (0.051835023)
Confidence ratio: 18.291256
Adjusted confidence: 0.94812983

Classification results for BoardPosition(file: 7, rank: 2):
- white_rook: 0.9989638
- white_knight: 0.0006915265
- black_knight: 0.00022520062

Classification rejected at BoardPosition(file: 7, rank: 2):
Top result: white_rook (0.9989638)
Second best: white_knight (0.0006915265)
Confidence ratio: 1444.3287
Adjusted confidence: 0.9989638

Classification results for BoardPosition(file: 0, rank: 3):
- white_rook: 0.99999315
- white_king: 5.72426e-06
- white_knight: 1.0547665e-06

Classification rejected at BoardPosition(file: 0, rank: 3):
Top result: white_rook (0.99999315)
Second best: white_king (5.72426e-06)
Confidence ratio: 171130.05
Adjusted confidence: 0.99999315

Classification results for BoardPosition(file: 1, rank: 3):
- black_knight: 0.9960707
- black_rook: 0.0038440374
- black_pawn: 7.4432515e-05

Classification rejected at BoardPosition(file: 1, rank: 3):
Top result: black_knight (0.9960707)
Second best: black_rook (0.0038440374)
Confidence ratio: 259.1129
Adjusted confidence: 0.9960707

Classification results for BoardPosition(file: 2, rank: 3):
- white_rook: 0.9182533
- white_knight: 0.067995325
- white_king: 0.01360172

Classification rejected at BoardPosition(file: 2, rank: 3):
Top result: white_rook (0.9182533)
Second best: white_knight (0.067995325)
Confidence ratio: 13.50463
Adjusted confidence: 0.9182533

Classification results for BoardPosition(file: 3, rank: 3):
- white_bishop: 1.0
- white_knight: 1.1954664e-12
- black_bishop: 7.699053e-15

Classification results for BoardPosition(file: 4, rank: 3):
- white_rook: 0.7775835
- white_king: 0.1671592
- white_knight: 0.055232733

Classification rejected at BoardPosition(file: 4, rank: 3):
Top result: white_rook (0.7775835)
Second best: white_king (0.1671592)
Confidence ratio: 4.6517506
Adjusted confidence: 0.7775835

Classification results for BoardPosition(file: 5, rank: 3):
- black_knight: 0.99874353
- white_knight: 0.0012564451
- black_bishop: 3.574968e-22

Classification rejected at BoardPosition(file: 5, rank: 3):
Top result: black_knight (0.99874353)
Second best: white_knight (0.0012564451)
Confidence ratio: 794.82086
Adjusted confidence: 0.99874353

Classification results for BoardPosition(file: 6, rank: 3):
- white_rook: 0.9706584
- white_knight: 0.022920413
- white_king: 0.0057876245

Classification rejected at BoardPosition(file: 6, rank: 3):
Top result: white_rook (0.9706584)
Second best: white_knight (0.022920413)
Confidence ratio: 42.34886
Adjusted confidence: 0.9706584

Classification results for BoardPosition(file: 7, rank: 3):
- black_knight: 0.9966006
- black_rook: 0.003287367
- black_pawn: 9.90469e-05

Classification rejected at BoardPosition(file: 7, rank: 3):
Top result: black_knight (0.9966006)
Second best: black_rook (0.003287367)
Confidence ratio: 303.14975
Adjusted confidence: 0.9966006

Classification results for BoardPosition(file: 0, rank: 4):
- white_pawn: 0.98597604
- black_pawn: 0.0140145635
- black_bishop: 9.396416e-06

Classification results for BoardPosition(file: 1, rank: 4):
- white_rook: 0.9300271
- white_knight: 0.060600415
- white_king: 0.00936738

Classification rejected at BoardPosition(file: 1, rank: 4):
Top result: white_rook (0.9300271)
Second best: white_knight (0.060600415)
Confidence ratio: 15.346847
Adjusted confidence: 0.9300271

Classification results for BoardPosition(file: 2, rank: 4):
- black_knight: 0.99934757
- white_rook: 0.00042515533
- white_pawn: 0.00011956119

Classification rejected at BoardPosition(file: 2, rank: 4):
Top result: black_knight (0.99934757)
Second best: white_rook (0.00042515533)
Confidence ratio: 2349.888
Adjusted confidence: 0.99934757

Classification results for BoardPosition(file: 3, rank: 4):
- white_king: 0.6209436
- white_rook: 0.28476056
- white_knight: 0.0942869

Classification rejected at BoardPosition(file: 3, rank: 4):
Top result: white_king (0.6209436)
Second best: white_rook (0.28476056)
Confidence ratio: 2.1805806
Adjusted confidence: 0.6209436

Classification results for BoardPosition(file: 4, rank: 4):
- white_king: 0.96777105
- white_pawn: 0.032224275
- white_queen: 3.3261906e-06

Classification rejected at BoardPosition(file: 4, rank: 4):
Top result: white_king (0.96777105)
Second best: white_pawn (0.032224275)
Confidence ratio: 30.03225
Adjusted confidence: 0.96777105

Classification results for BoardPosition(file: 5, rank: 4):
- white_knight: 0.40687096
- white_king: 0.30544162
- white_rook: 0.28753942

Classification rejected at BoardPosition(file: 5, rank: 4):
Top result: white_knight (0.40687096)
Second best: white_king (0.30544162)
Confidence ratio: 1.3320739
Adjusted confidence: 0.40687096

Classification results for BoardPosition(file: 6, rank: 4):
- black_knight: 0.9783021
- black_rook: 0.020397034
- black_pawn: 0.0010299487

Classification rejected at BoardPosition(file: 6, rank: 4):
Top result: black_knight (0.9783021)
Second best: black_rook (0.020397034)
Confidence ratio: 47.96268
Adjusted confidence: 0.9783021

Classification results for BoardPosition(file: 7, rank: 4):
- white_pawn: 0.99999607
- black_pawn: 3.9582374e-06
- black_bishop: 6.14308e-14

Classification results for BoardPosition(file: 0, rank: 5):
- white_rook: 0.9999859
- white_king: 1.4105989e-05
- white_knight: 3.5917537e-08

Classification rejected at BoardPosition(file: 0, rank: 5):
Top result: white_rook (0.9999859)
Second best: white_king (1.4105989e-05)
Confidence ratio: 70296.8
Adjusted confidence: 0.9999859

Classification results for BoardPosition(file: 1, rank: 5):
- white_queen: 1.0
- black_queen: 6.9438193e-09
- white_bishop: 1.4069858e-13

Classification results for BoardPosition(file: 2, rank: 5):
- white_rook: 0.99900144
- white_king: 0.0006145796
- white_knight: 0.0003839481

Classification rejected at BoardPosition(file: 2, rank: 5):
Top result: white_rook (0.99900144)
Second best: white_king (0.0006145796)
Confidence ratio: 1625.1885
Adjusted confidence: 0.99900144

Classification results for BoardPosition(file: 3, rank: 5):
- white_pawn: 0.9735881
- black_pawn: 0.026411904
- black_bishop: 3.9050807e-13

Classification rejected at BoardPosition(file: 3, rank: 5):
Top result: white_pawn (0.9735881)
Second best: black_pawn (0.026411904)
Confidence ratio: 36.86155
Adjusted confidence: 0.9735881

Classification results for BoardPosition(file: 4, rank: 5):
- white_pawn: 0.99999356
- black_pawn: 6.4090927e-06
- black_bishop: 3.2518378e-14

Classification rejected at BoardPosition(file: 4, rank: 5):
Top result: white_pawn (0.99999356)
Second best: black_pawn (6.4090927e-06)
Confidence ratio: 153178.2
Adjusted confidence: 0.99999356

Classification results for BoardPosition(file: 5, rank: 5):
- black_knight: 0.9346667
- black_rook: 0.06530247
- black_bishop: 1.5262372e-05

Classification rejected at BoardPosition(file: 5, rank: 5):
Top result: black_knight (0.9346667)
Second best: black_rook (0.06530247)
Confidence ratio: 14.312859
Adjusted confidence: 0.9346667

Classification results for BoardPosition(file: 6, rank: 5):
- white_rook: 0.99926656
- white_knight: 0.00059136405
- white_king: 0.00014079778

Classification rejected at BoardPosition(file: 6, rank: 5):
Top result: white_rook (0.99926656)
Second best: white_knight (0.00059136405)
Confidence ratio: 1689.4249
Adjusted confidence: 0.99926656

Classification results for BoardPosition(file: 7, rank: 5):
- black_knight: 0.9998666
- black_rook: 0.00013308175
- white_rook: 1.6393918e-07

Classification rejected at BoardPosition(file: 7, rank: 5):
Top result: black_knight (0.9998666)
Second best: black_rook (0.00013308175)
Confidence ratio: 7506.452
Adjusted confidence: 0.9998666

Classification results for BoardPosition(file: 0, rank: 6):
- white_rook: 0.6130078
- black_knight: 0.3607682
- black_rook: 0.026095843

Classification rejected at BoardPosition(file: 0, rank: 6):
Top result: white_rook (0.6130078)
Second best: black_knight (0.3607682)
Confidence ratio: 1.699173
Adjusted confidence: 0.6130078

Classification results for BoardPosition(file: 1, rank: 6):
- white_pawn: 0.99999845
- black_pawn: 1.5546049e-06
- black_bishop: 1.3642005e-11

Classification rejected at BoardPosition(file: 1, rank: 6):
Top result: white_pawn (0.99999845)
Second best: black_pawn (1.5546049e-06)
Confidence ratio: 597436.94
Adjusted confidence: 0.99999845

Classification results for BoardPosition(file: 2, rank: 6):
- black_knight: 0.99884737
- white_rook: 0.0008275975
- black_rook: 0.00031895642

Classification rejected at BoardPosition(file: 2, rank: 6):
Top result: black_knight (0.99884737)
Second best: white_rook (0.0008275975)
Confidence ratio: 1206.7502
Adjusted confidence: 0.99884737

Classification results for BoardPosition(file: 3, rank: 6):
- white_bishop: 0.99873775
- black_bishop: 0.0012556859
- white_knight: 6.535806e-06

Classification rejected at BoardPosition(file: 3, rank: 6):
Top result: white_bishop (0.99873775)
Second best: black_bishop (0.0012556859)
Confidence ratio: 795.29675
Adjusted confidence: 0.99873775

Classification results for BoardPosition(file: 4, rank: 6):
- black_rook: 0.91434133
- white_rook: 0.054479513
- black_knight: 0.029062644

Classification rejected at BoardPosition(file: 4, rank: 6):
Top result: black_rook (0.91434133)
Second best: white_rook (0.054479513)
Confidence ratio: 16.783176
Adjusted confidence: 0.91434133

Classification results for BoardPosition(file: 5, rank: 6):
- white_pawn: 0.99999875
- black_pawn: 1.2670436e-06
- black_bishop: 1.4581098e-14

Classification rejected at BoardPosition(file: 5, rank: 6):
Top result: white_pawn (0.99999875)
Second best: black_pawn (1.2670436e-06)
Confidence ratio: 721368.25
Adjusted confidence: 0.99999875

Classification results for BoardPosition(file: 6, rank: 6):
- white_pawn: 0.9924884
- black_pawn: 0.0075116316
- black_bishop: 5.484788e-10

Classification rejected at BoardPosition(file: 6, rank: 6):
Top result: white_pawn (0.9924884)
Second best: black_pawn (0.0075116316)
Confidence ratio: 132.12477
Adjusted confidence: 0.9924884

Classification results for BoardPosition(file: 7, rank: 6):
- white_rook: 0.9999656
- white_king: 1.7366758e-05
- white_knight: 1.700485e-05

Classification rejected at BoardPosition(file: 7, rank: 6):
Top result: white_rook (0.9999656)
Second best: white_king (1.7366758e-05)
Confidence ratio: 57186.75
Adjusted confidence: 0.9999656

Classification results for BoardPosition(file: 0, rank: 7):
- black_rook: 0.9481192
- white_rook: 0.051880363
- white_knight: 3.7680303e-07

Classification results for BoardPosition(file: 1, rank: 7):
- black_rook: 0.9994105
- black_knight: 0.00050535565
- white_rook: 7.980196e-05

Classification rejected at BoardPosition(file: 1, rank: 7):
Top result: black_rook (0.9994105)
Second best: black_knight (0.00050535565)
Confidence ratio: 1977.1715
Adjusted confidence: 0.9994105

Classification results for BoardPosition(file: 2, rank: 7):
- white_rook: 0.52612
- white_king: 0.47385767
- white_knight: 2.2209799e-05

Classification rejected at BoardPosition(file: 2, rank: 7):
Top result: white_rook (0.52612)
Second best: white_king (0.47385767)
Confidence ratio: 1.1102909
Adjusted confidence: 0.52612

Classification results for BoardPosition(file: 3, rank: 7):
- white_queen: 0.90863794
- black_queen: 0.09136204
- black_bishop: 2.6315076e-12

Classification rejected at BoardPosition(file: 3, rank: 7):
Top result: white_queen (0.90863794)
Second best: black_queen (0.09136204)
Confidence ratio: 9.945452
Adjusted confidence: 0.90863794

Classification results for BoardPosition(file: 4, rank: 7):
- white_king: 0.9999997
- black_king: 2.3221618e-07
- black_bishop: 3.7497816e-08

Classification rejected at BoardPosition(file: 4, rank: 7):
Top result: white_king (0.9999997)
Second best: black_king (2.3221618e-07)
Confidence ratio: 2845552.8
Adjusted confidence: 0.9999997

Classification results for BoardPosition(file: 5, rank: 7):
- white_bishop: 0.99834645
- black_bishop: 0.0016535616
- white_knight: 1.7680212e-09

Classification rejected at BoardPosition(file: 5, rank: 7):
Top result: white_bishop (0.99834645)
Second best: black_bishop (0.0016535616)
Confidence ratio: 603.7117
Adjusted confidence: 0.99834645

Classification results for BoardPosition(file: 6, rank: 7):
- white_king: 0.5149147
- white_rook: 0.48506972
- white_knight: 1.5106151e-05

Classification rejected at BoardPosition(file: 6, rank: 7):
Top result: white_king (0.5149147)
Second best: white_rook (0.48506972)
Confidence ratio: 1.0615269
Adjusted confidence: 0.5149147

Classification results for BoardPosition(file: 7, rank: 7):
- black_rook: 0.9999986
- white_rook: 1.368569e-06
- black_queen: 2.4758154e-11

Classification rejected at BoardPosition(file: 7, rank: 7):
Top result: black_rook (0.9999986)
Second best: white_rook (1.368569e-06)
Confidence ratio: 672142.25
Adjusted confidence: 1.0
ERROR: Position analysis failed - invalidPosition("Invalid black king count: 0")
ERROR: Snapshot failed - invalidPosition("Invalid black king count: 0")