-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
850 lines (774 loc) · 36.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Alan Yee's Homepage</title>
<style type='text/css'>
element.style {}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: underline;
}
.date {
color: #aaa;
margin-left: 1em;
}
h1, h2, h3, h4 {
text-rendering: optimizeLegibility;
}
body {
font-family: 'Helvetica Neue', Helvetica, sans-serif;
margin: 1em auto 4em auto;
position: relative;
tab-size: 2;
width: 960px;
}
h1 {
font-size: 64px;
font-weight: 300;
letter-spacing: -2px;
margin: .3em 0 .1em 0;
}
table, td {
border:1px solid #d4d4d4;
border-collapse:collapse;
padding-left:5px
}
th {
color: #ffffff;
background-color: #555555;
border: 1px solid #d4d4d4;
padding: 1px;
}
tr:nth-child(odd) {background-color:#f1f1f1;}
tr:nth-child(even) {background-color:#ffffff;}
.bar {
fill: #1f77b4;
}
svg text{
fill: white;
}
.bar:hover {
fill: brown;
}
.axis text {
font: 11px helvetica;
fill: black
}
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
</style>
</head>
<!--TODO: Add bootstrap to replace table and make a standarized view of entire website for all browsers-->
<body>
<header><a href='https://www.linkedin.com/pub/alan-yee/52/b25/b38'>Alan Yee</a>
<span class='date'>December 15, 2015</span></header>
<h1 align='left'>An Analysis of Chess: Endgames</h1>
<script src='http://d3js.org/d3.v3.min.js'></script>
<h2><font color=#666>The Most Common Endgames</h2>
<table style='position:absolute;margin-top:300px; margin-left:600px;' border='0' cellpadding='10'>
<tbody>
<tr>
<td valign='top' align='left'>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
= <a href='https://en.wikipedia.org/wiki/Rook_(chess)'>Rook</a>
<br>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
= <a href='https://en.wikipedia.org/wiki/Pawn_(chess)'>Pawn</a>
<br>
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
= <a href='https://en.wikipedia.org/wiki/Bishop_(chess)'>Bishop</a>
<br>
<img border='0' src='img/p_knight.gif' alt='Knight' width='12' height='14' title='Knight'>
= <a href='https://en.wikipedia.org/wiki/Knight_(chess)'>Knight</a>
<br>
<img border='0' src='img/p_queen.gif' alt='Queen' width='13' height='14' title='Queen'>
= <a href='https://en.wikipedia.org/wiki/Queen_(chess)'>Queen</a>
</td>
</tr>
</tbody>
</table>
<div id='area1'>
<table style='position:absolute' border='0' cellpadding='1' width='243'>
<tbody>
<tr>
<th>Winning</th>
<th>Losing</th>
</tr>
<tr>
<td> <!-- 1 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 2 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 3 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 4 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 5 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 6 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 7 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
</td>
</tr>
<tr>
<td> <!-- 8 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_knight.gif' alt='Knight' width='12' height='14' title='Knight'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 9 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 10 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 11 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
</td>
</tr>
<tr>
<td> <!-- 12 -->
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_knight.gif' alt='Knight' width='12' height='14' title='Knight'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 13 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 14 -->
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 15 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 16 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 17 -->
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_knight.gif' alt='Knight' width='12' height='14' title='Knight'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 18 -->
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 19 -->
<img border='0' src='img/p_queen.gif' alt='Queen' width='13' height='14' title='Queen'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_queen.gif' alt='Queen' width='13' height='14' title='Queen'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 20 -->
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 21 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_knight.gif' alt='Knight' width='12' height='14' title='Knight'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 22 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 23 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_knight.gif' alt='Knight' width='12' height='14' title='Knight'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 24 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_knight.gif' alt='Knight' width='12' height='14' title='Knight'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_knight.gif' alt='Knight' width='12' height='14' title='Knight'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 25 -->
<img border='0' src='img/p_queen.gif' alt='Queen' width='13' height='14' title='Queen'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_queen.gif' alt='Queen' width='13' height='14' title='Queen'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 26 -->
<img border='0' src='img/p_knight.gif' alt='Knight' width='12' height='14' title='Knight'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 27 -->
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_knight.gif' alt='Knight' width='12' height='14' title='Knight'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 28 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_bishop.gif' alt='Bishop' width='13' height='14' title='Bishop'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_knight.gif' alt='Knight' width='12' height='14' title='Knight'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 29 -->
<img border='0' src='img/p_knight.gif' alt='Knight' width='12' height='14' title='Knight'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_knight.gif' alt='Knight' width='12' height='14' title='Knight'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
<tr>
<td> <!-- 30 -->
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_knight.gif' alt='Knight' width='12' height='14' title='Knight'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
<td>
<img border='0' src='img/p_rook.gif' alt='Rook' width='12' height='14' title='Rook'>
<img border='0' src='img/p_knight.gif' alt='Knight' width='12' height='14' title='Knight'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
<img border='0' src='img/p_pawn.gif' alt='Pawn' width='11' height='14' title='Pawn'>
</td>
</tr>
</tbody>
</table>
</div>
<script>
(function() {
var margin = {top: 18, right: 10, bottom: 10, left: 10},
width = 960 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom + 199;
var x = d3.scale.linear()
.range([0, 625]);
var y = d3.scale.ordinal()
.rangeRoundBands([0, height], 0.05);
var xAxis = d3.svg.axis()
.scale(x)
.orient('bottom');
var yAxis = d3.svg.axis()
.scale(y)
.orient('right');
var chart1 = d3.select('#area1')
.append('svg')
.attr('width', width + margin.left + margin.right)
.attr('height', height + margin.top + margin.bottom + 10)
.append('g')
.attr('transform', 'translate(300,' + margin.top + ')');
d3.tsv('data1.tsv', type, function(error, data) {
x.domain(d3.extent(data, function(d) { return d.value; })).nice();
y.domain(data.map(function(d) { return d.name; }));
chart1.selectAll('.bar')
.data(data)
.enter().append('rect')
.attr('class', function(d) { return d.value < 0 ? 'bar negative' : 'bar positive'; })
.attr('x', function(d) { return x(Math.min(0, d.value)); })
.attr('y', function(d) { return y(d.name); })
.attr('width', function(d) { return Math.abs(x(d.value) - x(0)); })
.attr('height', y.rangeBand());
chart1.selectAll('text')
.data(data)
.enter().append('text')
.attr('x', function(d) { return Math.abs(x(d.value) - x(0)); })
.attr('y', function(d){ return y(d.name) + y.rangeBand()/2; } )
.attr('dx', -65)
.attr('dy', '.36em')
.attr('text-anchor', 'end')
.text(function(d) { return d.value; });
chart1.append('g')
.attr('class', 'x axis')
.attr('transform', 'translate(0,' + height + ')')
.call(xAxis)
.append('text')
.attr('x', 500)
.attr('y', -10)
.style('text-anchor', 'end')
.text('Number of Games');
chart1.append('g')
.attr('class', 'y axis');
});
function type(d) {
d.value = +d.value;
return d;
}
})();
</script>
<div style='color: black'>
<p>
In extrapolating an
<a href='http://www.chessgames.com/chessstats.html'>online chess database</a>
of 721,983 games, I have visualized a total sum of
112,073 games that make up the top thirty most common
<a href='https://en.wikipedia.org/wiki/Chess_endgame'>endgames</a>
— the chart on the left shows the remaining pieces for each side
when the game ends. Though since this data spans from 1475 to 2014,
this graph may not be entirely pertinent for the modern metagame,
but still holds value for the history of chess and the game itself.
Also, since the database's average
<a href='https://en.wikipedia.org/wiki/Elo_rating_system'>Elo ranking</a>
is 2199, any analysis here may not apply much for beginners or
novices, or any games between players with a significant difference in Elo.
</p>
<p>
Now then, this visualization holds many interesting details
just waiting to be dissected and analysed.
</p>
</div>
<h3><font color=#666>The Sustainability of Pieces</h3>
<div id='area2'></div>
<script>
(function() {
var margin = {top: 20, right: 40, bottom: 30, left: 40},
width = 960 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;
var formatPercent = d3.format('.0%');
var x0 = d3.scale.ordinal()
.rangeRoundBands([0, width], 0.1);
var x1 = d3.scale.ordinal();
var y = d3.scale.linear()
.range([height, 0]);
var color = d3.scale.ordinal()
.range(['#8a89a6', '#d0743c']);
var xAxis = d3.svg.axis()
.scale(x0)
.orient('bottom');
var yAxis = d3.svg.axis()
.scale(y)
.orient('left')
.tickFormat(formatPercent);
var chart2 = d3.select('#area2').append('svg')
.attr('width', width + margin.left + margin.right)
.attr('height', height + margin.top + margin.bottom)
.append('g')
.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
d3.csv('data2.csv', function(error, data) {
var ageNames = d3.keys(data[0]).filter(function(key) { return key !== 'State'; });
data.forEach(function(d) {
d.ages = ageNames.map(function(name) { return {name: name, value: +d[name]}; });
});
x0.domain(data.map(function(d) { return d.State; }));
x1.domain(ageNames).rangeRoundBands([0, x0.rangeBand()]);
y.domain([0, d3.max(data, function(d) { return d3.max(d.ages, function(d) { return d.value; }); })]);
chart2.append('g')
.attr('class', 'x axis')
.attr('transform', 'translate(0,' + height + ')')
.call(xAxis);
chart2.append('g')
.attr('class', 'y axis')
.call(yAxis)
.append('text')
.attr('transform', 'rotate(-90)')
.attr('y', 6)
.attr('dy', '.71em')
.style('text-anchor', 'end')
.text('Sustainability');
var state = chart2.selectAll('.state')
.data(data)
.enter().append('g')
.attr('class', 'g')
.attr('transform', function(d) { return 'translate(' + x0(d.State) + ',0)'; });
state.selectAll('rect')
.data(function(d) { return d.ages; })
.enter().append('rect')
.attr('width', x1.rangeBand())
.attr('x', function(d) { return x1(d.name); })
.attr('y', function(d) { return y(d.value); })
.attr('height', function(d) { return height - y(d.value); })
.style('fill', function(d) { return color(d.name); });
var legend = chart2.selectAll('.legend')
.data(ageNames.slice())
.enter().append('g')
.attr('class', 'legend')
.attr('transform', function(d, i) { return 'translate(0,' + i * 20 + ')'; });
legend.append('rect')
.attr('x', width - 18)
.attr('width', 18)
.attr('height', 18)
.style('fill', color);
legend.append('text')
.attr('x', width - 24)
.attr('y', 9)
.attr('dy', '.35em')
.style('fill', 'black')
.style('text-anchor', 'end')
.text(function(d) { return d; });
});
})();
</script>
<div style='color: black'>
<p>
This graph shows a piece's sustainability — the likeliness
a piece will survive until the endgame. The king always
survive since that piece cannot be eaten, while none of the
common endgames ended with a second copy of a knight, bishop,
and rook. If you are winning, pawn are basically guaranteed to
have at least one pawn in your arsenal. If you have a rook,
your enemy is likely to have a rook; this applies vice versa,
and such a mirror scenario occurs for the players' possession of their
respective queens. Winning side has a little over 11% in sustainability
for their bishops than the losing side's, while the losing side's
is 8% more likely to live. This information speaks to the common
theory that bishops work better than knights, on their own, as
knights synergize with the movements and positions of the pawns,
and as the game progresses, both sides start losing their pawns.
</p>
</div>
<h4><font color=#666>The Difference in Point Advantage</h4>
<div id='area3'></div>
<script>
(function() {
var width = 960,
height = 500,
radius = Math.min(width, height) / 2;
var color = d3.scale.ordinal()
.range(['#98abc5', '#8a89a6', '#7b6888', '#6b486b',
'#a05d56', '#d0743c', '#ff8c00']);
var arc = d3.svg.arc()
.outerRadius(radius - 10)
.innerRadius(0);
var pie = d3.layout.pie()
.sort(null)
.value(function(d) { return d.percentage; });
var chart3 = d3.select('#area3').append('svg')
.attr('width', width)
.attr('height', height)
.append('g')
.attr('transform', 'translate(' + width / 2 + ',' + height / 2 + ')');
d3.csv('data3.csv', function(error, data) {
data.forEach(function(d) {
d.percentage = +d.percentage;
});
var g = chart3.selectAll('.arc')
.data(pie(data))
.enter().append('g')
.attr('class', 'arc');
g.append('path')
.attr('d', arc)
.style('stroke', '#fff')
.style('fill', function(d) { return color(d.data.adv); });
g.append('text')
.attr('transform', function(d) { return 'translate(' + arc.centroid(d) + ')'; })
.attr('dy', '.35em')
.style('text-anchor', 'middle')
.text(function(d) { return d.data.adv; });
});
})();
</script>
<div style='color: black'>
<p>
The data also reveals that
<a href='https://en.wikipedia.org/wiki/Chess_piece_relative_value#Standard_valuations'>
points
</a>
matter. In analysing the game of chess, past scholars have
made a standardized value system that nominates points for all
the pieces of the game. Pawns are worth 1 each, bishops and
knights are worth are 3 each, rooks are worth 5 each, the queen is
worth 9, and the king is worth 1. So each player starts with
39 in total, and each lose points as each lose each's
respective pieces. The graph shows that the winning side
usually either 1 or 2 points ahead, or both sides are tied.
</p>
</div>
<footer>
<p>
Data Source: <a href='http://www.chessgames.com'>Chessgames webmaster: August 12, 2014</a>
</p>
</footer>
</body>
</html>