-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbonanza directions.html
1440 lines (1333 loc) · 60.4 KB
/
bonanza directions.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
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title>Bonanza Version 4.0.4 bonanza_v4.0.3\src\bonanza\bonanza.txt 翻訳 -
internalservererrorの日記</title>
<link rel="start" href="http://d.hatena.ne.jp/internalservererror/"
title="internalservererrorの日記">
<link rel="help" href="http://d.hatena.ne.jp/help" title="ヘルプ">
<link rel="prev"
href="http://d.hatena.ne.jp/internalservererror/20090205/1233827398"
title="ボナンザのソースを読む。強さの...">
<link rel="next"
href="http://d.hatena.ne.jp/internalservererror/20090208/1234058251"
title="Bonanza Version 4.0.4 はCygwi...">
<link rel="stylesheet" href="bonanza%20directions_files/base.css"
type="text/css" media="all">
<link rel="stylesheet"
href="bonanza%20directions_files/headerstyle_wh.css" type="text/css"
media="all">
<link rel="stylesheet" href="bonanza%20directions_files/pure-soda.css"
type="text/css" media="all">
<link rel="alternate" type="application/rss+xml" title="RSS"
href="http://d.hatena.ne.jp/internalservererror/rss">
<link rel="alternate" type="application/rss+xml" title="RSS 2.0"
href="http://d.hatena.ne.jp/internalservererror/rss2">
<link rel="meta" type="application/rdf+xml" title="FOAF"
href="http://d.hatena.ne.jp/internalservererror/foaf">
<link rel="search" type="application/opensearchdescription+xml"
href="http://d.hatena.ne.jp/internalservererror/opensearch/diary.xml"
title="internalservererrorの日記内日記検索">
<link rel="search" type="application/opensearchdescription+xml"
href="http://d.hatena.ne.jp/internalservererror/opensearch/archive.xml"
title="internalservererrorの日記内一覧検索">
<link rel="shortcut icon"
href="http://d.hatena.ne.jp/images/wh_favicon.ico">
<style type="text/css">
<!--
-->
</style>
<!--
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
<rdf:Description rdf:about="http://d.hatena.ne.jp/internalservererror/20090205/1233841369">
<foaf:maker rdf:parseType="Resource">
<foaf:holdsAccount>
<foaf:OnlineAccount foaf:accountName="internalservererror">
<foaf:accountServiceHomepage rdf:resource="http://www.hatena.ne.jp/" />
</foaf:OnlineAccount>
</foaf:holdsAccount>
</foaf:maker>
</rdf:Description>
</rdf:RDF>
-->
<link rel="alternate" media="handheld" type="text/html"
href="http://d.hatena.ne.jp/internalservererror/mobile?date=20090205&section=1233841369">
<!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
<rdf:Description
rdf:about="http://d.hatena.ne.jp/internalservererror/20090205/1233841369"
trackback:ping="http://d.hatena.ne.jp/internalservererror/20090205/1233841369"
dc:title="Bonanza Version 4.0.4 bonanza_v4.0.3¥src¥bonanza¥bonanza.txt 翻訳"
dc:identifier="http://d.hatena.ne.jp/internalservererror/20090205/1233841369" />
</rdf:RDF>
-->
<script type="text/javascript" src="bonanza%20directions_files/HatenaStar.js"></script>
<script type="text/javascript">
Hatena.Star.SiteConfig = {
entryNodes: {
'div.section': {
uri: 'h3 a',
title: 'h3',
container: 'h3'
}
}
};
Hatena.Author = new Hatena.User('internalservererror');
</script>
<script type="text/javascript" src="bonanza%20directions_files/adcolor.js"></script>
<script type="text/javascript" src="bonanza%20directions_files/quick_pager.js"></script>
<script type="text/javascript" src="bonanza%20directions_files/diary_utils.js"></script>
<script type="text/javascript" src="bonanza%20directions_files/max_width_fotolife.js"></script>
<!--
<
-->
<script type="text/javascript" src="bonanza%20directions_files/entries.json"></script></head><body>
<div id="simple-header">
<a href="http://www.hatena.ne.jp/"><img
src="bonanza%20directions_files/hatena-simple_wh.gif" alt="Hatena::"
title="Hatena::" id="logo-hatena" height="17" width="65"></a><a
href="http://d.hatena.ne.jp/"><img
src="bonanza%20directions_files/diary-simple_wh.gif" alt="Diary"
title="Diary" id="logo-diary" height="17" width="43"></a>
<form method="get" action="/search" class="search-form">
<input class="search-word" name="word" value="dekunobou shogi"
type="text"><input name="name" value="internalservererror" type="hidden"><input
name="diary" value="日記" class="search-button" type="submit"><input
name="submit" value="検索" class="search-button" type="submit">
</form>
<ul class="menu">
<li><a href="http://d.hatena.ne.jp/internalservererror/">ブログトップ</a></li>
<li><a href="http://d.hatena.ne.jp/internalservererror/archive">記事一覧</a></li>
<li><a
href="https://www.hatena.ne.jp/login?backurl=http%3A%2F%2Fd.hatena.ne.jp%2Finternalservererror%2F20090205%2F1233841369&add_timestamp=1">ロ
グイン</a></li>
<li><a
href="https://www.hatena.ne.jp/register?location=http://d.hatena.ne.jp/">無
料ブログ開設</a></li>
</ul>
</div>
<h1><a href="http://d.hatena.ne.jp/internalservererror/">internalservererror
の日記</a></h1>
<div class="hatena-body">
<div class="main">
<div class="calendar" id="pager-top">
<a rel="prev"
href="http://d.hatena.ne.jp/internalservererror/20090205/1233827398"
class="prev"><ボナンザのソースを読む。強さの...</a> <span class="delimiter">|</span> <a
rel="next"
href="http://d.hatena.ne.jp/internalservererror/20090208/1234058251"
class="next">Bonanza Version 4.0.4 はCygwi...></a><span
id="edit-in-place-add"></span>
</div>
<div id="days">
<div class="day">
<h2><a href="http://d.hatena.ne.jp/internalservererror/20090205"><span
class="date">2009-02-05</span></a></h2>
<div class="body">
<!-- google_ad_section_start -->
<div class="section">
<h3 class="title"><a
href="http://d.hatena.ne.jp/internalservererror/20090205/1233841369"
name="1233841369">Bonanza Version 4.0.4
bonanza_v4.0.3\src\bonanza\bonanza.txt 翻訳</a><span
class="hatena-star-comment-container"><img
class="hatena-star-comment-button" style="cursor: pointer; margin: 0pt;
padding: 0pt; border: medium none; vertical-align: middle; display:
none;" title="Comments" alt="Comments" tabindex="0"
src="bonanza%20directions_files/comment.gif"></span><span
class="hatena-star-star-container"><img class="hatena-star-add-button"
style="cursor: pointer; margin: 0pt 3px; padding: 0pt; border: medium
none; vertical-align: middle;" title="Add Star" alt="Add Star"
tabindex="0" src="bonanza%20directions_files/add.gif"></span></h3> <p
class="sectionheader"> <span class="timestamp">22:42</span></p>
<p>少しずつ訳していきます。</p>
<p>正確ではないです。</p>
<br>
<p>----------------------------------------------------------------------</p>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a>
Version 4.0.4 Source Code</p>
<p>Kunihito Hoki, 2 Feb 2009</p>
<p>----------------------------------------------------------------------</p>
<br>
<p>1. Introduction</p>
<p>----------------</p>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a>
is a state-of-the art computer <span class="highlight">shogi</span>
engine which runs on</p>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/Windows">Windows</a>
and <a class="keyword" href="http://d.hatena.ne.jp/keyword/Linux">Linux</a>
machines, and this directory contains a</p>
<p>platform-independent source code.</p>
<p><a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%DC%A5%CA%A5%F3%A5%B6">ボナンザ</a>は最
先端の<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%B3%A5%F3%A5%D4%A5%E5%A1%BC%A5%BF">コ
ンピュータ</a>ー<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%BE%AD%B4%FD">将棋</a>エンジンで<a
class="keyword" href="http://d.hatena.ne.jp/keyword/Windows">Windows</a>、<a
class="keyword" href="http://d.hatena.ne.jp/keyword/Linux">Linux</a>それぞ
れのプラットフォームで動きます。しかも<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%BD%A1%BC%A5%B9%A5%B3%A1%BC%A5%C9">ソー
スコード</a>付き!</p>
<p>この<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%BD%A1%BC%A5%B9%A5%B3%A1%BC%A5%C9">ソー
スコード</a>は<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%B3%A5%F3%A5%D4%A5%E5%A1%BC%A5%BF">コ
ンピュータ</a><a class="keyword"
href="http://d.hatena.ne.jp/keyword/%BE%AD%B4%FD">将棋</a>エンジンのパーツとして役に立つと
いう望みを持って配布されます。</p>
<p>This source code is distributed with a hope that it will be useful
in</p>
<p>addition to the main part of the <span class="highlight">shogi</span>
engine. This program includes</p>
<p>many useful functions such as manipulating a <span
class="highlight">shogi</span> board, reading and</p>
<p>writing a CSA record file, speaking of a CSA protocol with a
socket</p>
<p>communication, and controlling time, and etc.. I believe this
program</p>
<p>can be a good starting point if you are interested in making <span
class="highlight">shogi</span></p>
<p>programs.</p>
<p>この<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%D7%A5%ED%A5%B0%A5%E9%A5%E0">プログラ
ム</a>は多くの有用な<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%B4%D8%BF%F4">関数</a>、<a
class="keyword" href="http://d.hatena.ne.jp/keyword/%BE%AD%B4%FD">将棋</a>盤
を操作したり、CSAファイルを読んだり書いたり、CSAの<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%D7%A5%ED%A5%C8%A5%B3%A5%EB">プロトコ
ル</a>で操作、時間制御・・・などなど含みます。私はこの<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%D7%A5%ED%A5%B0%A5%E9%A5%E0">プログラ
ム</a>が<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%B3%A5%F3%A5%D4%A5%E5%A1%BC%A5%BF">コ
ンピュータ</a>ー<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%BE%AD%B4%FD">将棋</a>を作るよいスタート地点になること
を信じています。</p>
<p>One main feature of this program is that it employs a brute-force</p>
<p>search method together with bitboard techniques as many chess
programs</p>
<p>do. Another notable feature is a machine learning of <span
class="highlight">shogi</span> evaluation</p>
<p>functions. The details of the learning algorithm (aka <a
class="keyword" href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a>
method)</p>
<p>were already presented [1], and this source code provides an
example</p>
<p>of implementation of the learning method.</p>
<p>この<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%D7%A5%ED%A5%B0%A5%E9%A5%E0">プログラ
ム</a>のひとつの大きな特徴として<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%C1%A5%A7%A5%B9">チェス</a>のそれに用いられる
ビットボード技術を用いた総当たり探索があります。そのほかの特徴として<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%B5%A1%B3%A3%B3%D8%BD%AC">機械学習</a><a
class="keyword" href="http://d.hatena.ne.jp/keyword/%B4%D8%BF%F4">関数</a>が
あります。その学習<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%A2%A5%EB%A5%B4%A5%EA%A5%BA%A5%E0">ア
ルゴリズム</a>はすでに公開されており、さらにこの<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%BD%A1%BC%A5%B9%A5%B3%A1%BC%A5%C9">ソー
スコード</a>でも学習メソッドの実装の例を提供しています。</p>
<p>I admit that some parts of the source code are cryptic, e.g. codes
in</p>
<p>"mate1ply.c". I hope that I will have some time to make a quality</p>
<p>documentation and comments on the program code, or someone else
could</p>
<p>decrypt my program and provide a documentation.</p>
<p>私は、<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%BD%A1%BC%A5%B9%A5%B3%A1%BC%A5%C9">ソー
スコード</a>のいくつかの部分が不可解であることを認めます。たとえば”mate1ply.c”。私には<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%D7%A5%ED%A5%B0%A5%E9%A5%E0">プログラ
ム</a>・コードの品質文書とコメントをするいくらかの時間があるこ</p>
<p>とを願っているか、他の誰かが、私の<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%D7%A5%ED%A5%B0%A5%E9%A5%E0">プログラ
ム</a>を解読して、<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%C9%A5%AD%A5%E5%A5%E1%A5%F3%A5%C6%A1%BC%A5%B7%A5%E7%A5%F3">ド
キュメンテーション</a>を提供するかもしれません。</p>
<p>Any comments or suggestions are welcome [2].</p>
<p>どんなコメントや提案も歓迎します。</p>
<p>[1] K. Hoki, "Optimal control of minimax search results to learn</p>
<p>positional evaluation", Game Programing Workshop, Hakone, <a
class="keyword" href="http://d.hatena.ne.jp/keyword/Japan">Japan</a></p>
<p>2008.</p>
<p>[2] Contact to "bonanza_query [at] <a class="keyword"
href="http://d.hatena.ne.jp/keyword/hotmail">hotmail</a>.com".</p>
<br>
<p>2. Legal Notices</p>
<p>-----------------</p>
<p>This program is protected by <a class="keyword"
href="http://d.hatena.ne.jp/keyword/copyright">copyright</a>. Without a
specific</p>
<p>permission, any means of commercial applications are prohibited.</p>
<p>Furthermore, this program is distributed without a warrantee.</p>
<p>Within these limits, you can use, redistribute, and/or modify it.</p>
<p>法律云々について</p>
<p>この<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%D7%A5%ED%A5%B0%A5%E9%A5%E0">プログラ
ム</a>は<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%C3%F8%BA%EE%B8%A2">著作権</a>によって保護されま
す。 特別に許可がなければ、<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%A2%A5%D7%A5%EA%A5%B1%A1%BC%A5%B7%A5%E7%A5%F3">ア
プリケーション</a>として売ることはできません。</p>
<p>また、この<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%D7%A5%ED%A5%B0%A5%E9%A5%E0">プログラ
ム</a>は被<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%CA%DD%BE%DA%BF%CD">保証人</a>なしで配布されま
す。</p>
<p>これらの制約の中でなら使用し、再配付、そして変更することができます。</p>
<br>
<p>3. Change Logs</p>
<p>-----------</p>
<p>Version 4.0.4 (2 Feb 2009)</p>
<ul>
<li> An error of <a class="keyword"
href="http://d.hatena.ne.jp/keyword/GCC">GCC</a> inline assembly for
spinlock in "thread.c" is fixed.</li>
<li> In <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Windows">Windows</a> <a
class="keyword" href="http://d.hatena.ne.jp/keyword/OS">OS</a>, <a
class="keyword" href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a>
now opens all streams with file sharing by</li>
</ul>
<p>using "_SH_DENYNO" constant in "io.c".</p>
<ul>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/GCC">GCC</a>
built-in functions are substituted for <a class="keyword"
href="http://d.hatena.ne.jp/keyword/GCC">GCC</a> inline assemblies for</li>
</ul>
<p>bit-scan operations in "bitop.h". Furthermore, "bitop.h" is
removed,</p>
<p>and some of macros in the header are integrated into "<span
class="highlight">shogi</span>.h".</p>
<p>・<a class="keyword" href="http://d.hatena.ne.jp/keyword/GCC">GCC</a>で
スピンロックするエラーがあったのでthread.cを修正しました。</p>
<p>・<a class="keyword" href="http://d.hatena.ne.jp/keyword/Windows">Windows</a>
<a class="keyword" href="http://d.hatena.ne.jp/keyword/OS">OS</a>では、<a
class="keyword" href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a>は
ファイル共有でSH_DENYNOを使用することによって、すべての<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%B9%A5%C8%A5%EA%A1%BC%A5%E0">ストリー
ム</a>を開きます。"io.c"では一定です。</p>
<p>・"bitop.h"でのビット・スキャン操作のための<a class="keyword"
href="http://d.hatena.ne.jp/keyword/GCC">GCC</a><a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%A4%A5%F3%A5%E9%A5%A4%A5%F3%A5%A2%A5%BB%A5%F3%A5%D6%A5%EA">イ
ンラインアセンブリ</a>に<a class="keyword"
href="http://d.hatena.ne.jp/keyword/GCC">GCC</a>組</p>
<p>込み<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%B4%D8%BF%F4">関数</a>を代入します。
その上、"bitop.h"は移されます。そしてヘッダーの<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%DE%A5%AF%A5%ED">マクロ</a>のいくつかが"<span
class="highlight">shogi</span>.h"と統合されます。</p>
<p>Version 4.0.3 (<a class="keyword"
href="http://d.hatena.ne.jp/keyword/Jan">Jan</a> 2008)</p>
<br>
<p>4. Files</p>
<p>---------</p>
<p>Here is a list of files you can find in this directory.</p>
<p>ここにあなたがこの<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%C7%A5%A3%A5%EC%A5%AF%A5%C8%A5%EA">ディ
レクトリ</a>で見つけることができるファイルのリストがあります。</p>
<p>C headers</p>
<ul>
<li> param.h piece values</li>
<li> <span class="highlight">shogi</span>.h main header</li>
</ul>
<p>C ヘッダーファイル</p>
<ul>
<li> param.h 駒の価値</li>
<li> <span class="highlight">shogi</span>.h メインヘッダー</li>
</ul>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/basic">basic</a>
C functions</p>
<ul>
<li> main.c main function of C program</li>
<li> data.c definition of global variables</li>
<li> ini.c initializations</li>
<li> rand.c pseudo random number generator</li>
<li> time.c time functions</li>
<li> bitop.c bit operation</li>
<li> utility.c misc. functions</li>
</ul>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/basic">basic</a>
C functions</p>
<ul>
<li> main.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/C%B8%C0%B8%EC">C言語</a>のメイン・・・mainです</li>
<li> data.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%B0%A5%ED%A1%BC%A5%D0%A5%EB%CA%D1%BF%F4">グ
ローバル変数</a>が定義されている</li>
<li> ini.c 初期設定</li>
<li> rand.c 疑似<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%CD%F0%BF%F4">乱数</a>ジェネレータ</li>
<li> time.c 時間<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%B4%D8%BF%F4">関数</a></li>
<li> bitop.c ビット操作</li>
<li> utility.c ユーティリティ<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%B4%D8%BF%F4">関数</a>群</li>
</ul>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/I/O">I/O</a></p>
<ul>
<li> proce.c input procedure</li>
<li> csa.c csa file format <a class="keyword"
href="http://d.hatena.ne.jp/keyword/I/O">I/O</a></li>
<li> io.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/basic">basic</a> <a class="keyword"
href="http://d.hatena.ne.jp/keyword/I/O">I/O</a></li>
<li> dek.c <span class="highlight">dekunobou</span></li>
<li> sckt.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/TCP/IP">TCP/IP</a> <a
class="keyword" href="http://d.hatena.ne.jp/keyword/client">client</a>
of CSA <span class="highlight">SHOGI</span> protocol</li>
</ul>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/I/O">I/O</a></p>
<ul>
<li> proce.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%A4%A5%F3%A5%D7%A5%C3%A5%C8">インプッ
ト</a></li>
<li> csa.c csaのファイルフォーマット<a class="keyword"
href="http://d.hatena.ne.jp/keyword/I/O">I/O</a></li>
<li> io.c ベーシック <a class="keyword"
href="http://d.hatena.ne.jp/keyword/I/O">I/O</a></li>
<li> dek.c デクノボウ?</li>
<li> sckt.c CSA<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%D7%A5%ED%A5%C8%A5%B3%A5%EB">プロトコ
ル</a>の<a class="keyword" href="http://d.hatena.ne.jp/keyword/TCP/IP">TCP/IP</a><a
class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%AF%A5%E9%A5%A4%A5%A2%A5%F3%A5%C8">ク
ライアント</a></li>
</ul>
<p>bitboard manipulations</p>
<ul>
<li> attack.c piece attacks</li>
<li> genchk.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/move">move</a> generation (checks)</li>
<li> genevasn.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/move">move</a> generation (evasions)</li>
<li> gendrop.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/move">move</a> generation (<a
class="keyword" href="http://d.hatena.ne.jp/keyword/drops">drops</a>)</li>
<li> gennocap.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/move">move</a> generation
(non-captures)</li>
<li> gencap.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/move">move</a> generation (captures)</li>
<li> movgenex.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/move">move</a> generation (inferior
moves)</li>
<li> makemove.c make moves</li>
<li> unmake.c unmake <a class="keyword"
href="http://d.hatena.ne.jp/keyword/move">move</a></li>
<li> mate1ply.c 1-ply mate detection</li>
<li> debug.c examine bitboard validity</li>
</ul>
<p>ビットボード 操作</p>
<ul>
<li> attack.c 駒の利き</li>
<li> genchk.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/%B2%A6%BC%EA">王手</a>の生成</li>
<li> genevasn.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/%B2%A6%BC%EA">王手</a>回避の生成</li>
<li> gendrop.c 駒を打つ手生成</li>
<li> gennocap.c 駒を取らない手生成</li>
<li> gencap.c 駒を取る手生成</li>
<li> movgenex.c 下向きの動き生成</li>
<li> makemove.c 成り</li>
<li> unmake.c 成らず</li>
<li> mate1ply.c 1手詰め発見</li>
<li> debug.c ビットボードが正しいか調べる</li>
</ul>
<p>brute-force search</p>
<ul>
<li> iterate.c iterative deepning search at <a class="keyword"
href="http://d.hatena.ne.jp/keyword/root">root</a> node</li>
<li> searchr.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/alpha">alpha</a>-<a class="keyword"
href="http://d.hatena.ne.jp/keyword/beta">beta</a> search at <a
class="keyword" href="http://d.hatena.ne.jp/keyword/root">root</a> node</li>
<li> search.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/alpha">alpha</a>-<a class="keyword"
href="http://d.hatena.ne.jp/keyword/beta">beta</a> search</li>
<li> next.c obtains next <a class="keyword"
href="http://d.hatena.ne.jp/keyword/move">move</a></li>
<li> quiesrch.c quiescence search</li>
<li> evaluate.c static eveluation function</li>
<li> evaldiff.c easy and fast evaluation function</li>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/swap">swap</a>.c
static exchange evaluation</li>
<li> hash.c transposition table</li>
<li> thread.c thread-level parallelization</li>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/root">root</a>.c
<a class="keyword" href="http://d.hatena.ne.jp/keyword/root">root</a> <a
class="keyword" href="http://d.hatena.ne.jp/keyword/move">move</a>
genelation and shallow min-max search</li>
<li> mate3.c 3-ply mate detection</li>
<li> ponder.c pondering</li>
<li> book.c creates and probes opening book</li>
<li> problem.c auto problem solver</li>
<li> valid.c examine <a class="keyword"
href="http://d.hatena.ne.jp/keyword/move">move</a> validity</li>
</ul>
<p>総当たり探索</p>
<ul>
<li> iterate.c 反復探索(ルート<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%CE%A1%BC%A5%C9">ノード</a>)</li>
<li> searchr.c αβ探索(ルート<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%CE%A1%BC%A5%C9">ノード</a>)</li>
<li> search.c αβ探索</li>
<li> next.c 次に移るところをゲット</li>
<li> quiesrch.c 静的探索</li>
<li> evaluate.c 静的評価<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%B4%D8%BF%F4">関数</a></li>
<li> evaldiff.c 簡単かつ高速な評価<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%B4%D8%BF%F4">関数</a></li>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/swap">swap</a>.c
SEE</li>
<li> hash.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%CF%A5%C3%A5%B7%A5%E5">ハッシュ</a>化
テーブル</li>
<li> thread.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%B9%A5%EC%A5%C3%A5%C9">スレッド</a>並列
化</li>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/root">root</a>.c
根移動生成、浅い min-max探索</li>
<li> mate3.c 3手詰め発見</li>
<li> ponder.c 熟考</li>
<li> book.c 定石ファイルの使用</li>
<li> problem.c 自動問題解決</li>
<li> valid.c 合法手調査</li>
</ul>
<p>optimal control of min-max search</p>
<ul>
<li> learn1.c main functions</li>
<li> learn2.c feture <a class="keyword"
href="http://d.hatena.ne.jp/keyword/vector">vector</a> manipuration</li>
</ul>
<p>min-max 探索の<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%BA%C7%C5%AC%B2%BD">最適化</a></p>
<ul>
<li> learn1.c メイン<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%B4%D8%BF%F4">関数</a></li>
<li> learn2.c <a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%D9%A5%AF%A5%C8%A5%EB">ベクトル</a>操作</li>
</ul>
<p>misc.</p>
<ul>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/bonanza">bonanza</a>.txt
which now you are looking at</li>
<li> <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a> <a
class="keyword" href="http://d.hatena.ne.jp/keyword/makefile">makefile</a>
for <a class="keyword" href="http://d.hatena.ne.jp/keyword/gnu">gnu</a>
make.exe</li>
<li> <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a>.vs <a
class="keyword" href="http://d.hatena.ne.jp/keyword/makefile">makefile</a>
for <a class="keyword" href="http://d.hatena.ne.jp/keyword/Microsoft">Microsoft</a>
nmake.exe</li>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/bonanza">bonanza</a>.<a
class="keyword" href="http://d.hatena.ne.jp/keyword/ico">ico</a> icon
file for <a class="keyword" href="http://d.hatena.ne.jp/keyword/windows">windows</a></li>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/bonanza">bonanza</a>.rc
resource-definition file for <a class="keyword"
href="http://d.hatena.ne.jp/keyword/windows">windows</a></li>
</ul>
<p>その他</p>
<ul>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/bonanza">bonanza</a>.txt
今読んでるテキスト</li>
<li> <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a> <a
class="keyword" href="http://d.hatena.ne.jp/keyword/makefile">makefile</a>
です(<a class="keyword" href="http://d.hatena.ne.jp/keyword/gnu">gnu</a>
make.exe)</li>
<li> <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a>.vs <a
class="keyword" href="http://d.hatena.ne.jp/keyword/makefile">makefile</a>
です( <a class="keyword" href="http://d.hatena.ne.jp/keyword/Microsoft">Microsoft</a>
nmake.exe)</li>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/bonanza">bonanza</a>.<a
class="keyword" href="http://d.hatena.ne.jp/keyword/ico">ico</a> <a
class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%A2%A5%A4%A5%B3%A5%F3">アイコン</a>ファ
イル</li>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/bonanza">bonanza</a>.rc
<a class="keyword" href="http://d.hatena.ne.jp/keyword/windows">windows</a>用
の<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%EA%A5%BD%A1%BC%A5%B9">リソース</a>一覧</li>
</ul>
<p>4. How to build <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a></p>
<p>-----------------------</p>
<p>You can build <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a> by means of <a
class="keyword" href="http://d.hatena.ne.jp/keyword/GNU">GNU</a> Make on
<a class="keyword" href="http://d.hatena.ne.jp/keyword/Linux">Linux</a>
or <a class="keyword" href="http://d.hatena.ne.jp/keyword/Microsoft">Microsoft</a>
NMAKE</p>
<p>on <a class="keyword" href="http://d.hatena.ne.jp/keyword/Windows">Windows</a>.
Here is some examples:</p>
<p><a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%DC%A5%CA%A5%F3%A5%B6">ボナンザ</a>は<a
class="keyword" href="http://d.hatena.ne.jp/keyword/Linux">Linux</a>の<a
class="keyword" href="http://d.hatena.ne.jp/keyword/GNU">GNU</a> Make
でも <a class="keyword" href="http://d.hatena.ne.jp/keyword/Windows">Windows</a>の
NMAKEでも<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%D3%A5%EB%A5%C9">ビルド</a>できます。下記が例
です。</p>
<p>補足)bonanza_v4.0.3\<a class="keyword"
href="http://d.hatena.ne.jp/keyword/src">src</a>\<a class="keyword"
href="http://d.hatena.ne.jp/keyword/bonanza">bonanza</a>\を<a
class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%AB%A5%EC%A5%F3%A5%C8">カレント</a><a
class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%C7%A5%A3%A5%EC%A5%AF%A5%C8%A5%EA">ディ
レクトリ</a>として下記を実行する必要がある。</p>
<ul>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/GCC">GCC</a>
on <a class="keyword" href="http://d.hatena.ne.jp/keyword/Linux">Linux</a></li>
</ul>
<p>> make -f <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a> <a
class="keyword" href="http://d.hatena.ne.jp/keyword/gcc">gcc</a></p>
<ul>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/Intel">Intel</a>
<a class="keyword" href="http://d.hatena.ne.jp/keyword/C%2B%2B">C++</a>
Compiler on <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Linux">Linux</a></li>
</ul>
<p>> make -f <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a> <a
class="keyword" href="http://d.hatena.ne.jp/keyword/icc">icc</a></p>
<ul>
<li> <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Microsoft">Microsoft</a> <a
class="keyword" href="http://d.hatena.ne.jp/keyword/C/C%2B%2B">C/C++</a>
Compiler on <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Windows">Windows</a></li>
</ul>
<p>> nmake -f <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a>.vs <a
class="keyword" href="http://d.hatena.ne.jp/keyword/cl">cl</a></p>
<ul>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/Intel">Intel</a>
<a class="keyword" href="http://d.hatena.ne.jp/keyword/C%2B%2B">C++</a>
Compiler on <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Windows">Windows</a></li>
</ul>
<p>> nmake -f <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a>.vs icl</p>
<p>The C source codes are written by using <a class="keyword"
href="http://d.hatena.ne.jp/keyword/ANSI">ANSI</a> C plus a small number
of</p>
<p>new features in <a class="keyword"
href="http://d.hatena.ne.jp/keyword/ISO">ISO</a> C99. Therefore, I think
this can be easily built</p>
<p>in many platforms without much effort.</p>
<p>これら<a class="keyword"
href="http://d.hatena.ne.jp/keyword/C%B8%C0%B8%EC">C言語</a>の<a
class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%BD%A1%BC%A5%B9%A5%B3%A1%BC%A5%C9">ソー
スコード</a>は<a class="keyword" href="http://d.hatena.ne.jp/keyword/ANSI">ANSI</a>
C <a class="keyword" href="http://d.hatena.ne.jp/keyword/ISO">ISO</a>
C99で書かれています。</p>
<p>従って多くのプラットフォームで苦労することなく容易に<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%D3%A5%EB%A5%C9">ビルド</a>できるでしょう。</p>
<p>It may be necessary to define some macros in <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a> or</p>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a>.vs.
The macros are:</p>
<p>いくつかの<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%DE%A5%AF%A5%ED">マクロ</a>を<a
class="keyword" href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a>か<a
class="keyword" href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a>.vs
で定義する必要があると思います。</p>
<p>その<a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%DE%A5%AF%A5%ED">マクロ</a>は・・・</p>
<ul>
<li> NDEBUG (DEBUG) builds release (debug) version of <a
class="keyword" href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a></li>
</ul>
<p><a class="keyword"
href="http://d.hatena.ne.jp/keyword/%A5%DC%A5%CA%A5%F3%A5%B6">ボナンザ</a>のリ
リースバージョン</p>
<ul>
<li> MINIMUM disables some auxiliary functions that are not</li>
</ul>
<p>necessary to play a game, e.g., book composition</p>
<p>and optimization of evaluation functions</p>
<ul>
<li> TLP enables thread-level parallel search</li>
</ul>
<ul>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/MPV">MPV</a>
enables multi-<a class="keyword"
href="http://d.hatena.ne.jp/keyword/PV">PV</a> search</li>
</ul>
<ul>
<li> CSA_LAN enables <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a> to communicate
by CSA <span class="highlight">Shogi</span> <a class="keyword"
href="http://d.hatena.ne.jp/keyword/TCP/IP">TCP/IP</a></li>
</ul>
<p>protcol</p>
<ul>
<li> <span class="highlight">DEKUNOBOU</span> enables <span
class="highlight">dekunobou</span> <a class="keyword"
href="http://d.hatena.ne.jp/keyword/interface">interface</a> (available
only for</li>
</ul>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/Windows">Windows</a>)</p>
<ul>
<li> CSA<span class="highlight">SHOGI</span> builds an engine for
CSA <span class="highlight">Shogi</span> (available only for</li>
</ul>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/Windows">Windows</a>)</p>
<ul>
<li> NO_LOGGING suppresses dumping log files</li>
</ul>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a>
is an application that does not provide graphical user</p>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/interface">interface</a>.
If you could build "<a class="keyword"
href="http://d.hatena.ne.jp/keyword/bonanza">bonanza</a>.exe" properly
without CSA<span class="highlight">SHOGI</span></p>
<p>macro, it shows a prompt "Black 1>" when you execute it at a
computer</p>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/console">console</a>.</p>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a>
uses three binary files: a feature <a class="keyword"
href="http://d.hatena.ne.jp/keyword/vector">vector</a> of static
evaluation</p>
<p>function "fv.bin", an opening book "book.bin", and a</p>
<p>position-learning database "hash.bin". You can find these in
"winbin/"</p>
<p>directory. Without the NO_LOGGING option, <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a> must find
"log/"</p>
<p>directory to dump log files.</p>
<br>
<p>5. Command List</p>
<p>---------------</p>
<ul>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/beep">beep</a>
on</li>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/beep">beep</a>
off</li>
</ul>
<p>These commands enable (on) or disable (off) a <a class="keyword"
href="http://d.hatena.ne.jp/keyword/beep">beep</a> when <a
class="keyword" href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a></p>
<p>makes a <a class="keyword"
href="http://d.hatena.ne.jp/keyword/move">move</a>. The default is on.</p>
<ul>
<li> book on</li>
<li> <a class="keyword"
href="http://d.hatena.ne.jp/keyword/book%20off">book off</a></li>
</ul>
<p>These commands enable (on) or disable (off) to probe the opening</p>
<p>book, "./book.bin". The default is on.</p>
<ul>
<li> book narrow</li>
<li> book wide</li>
</ul>
<p>When the command with "narrow" is used, <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a> selects a book</p>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/move">move</a>
from a small set of opening moves. The default is "wide". The</p>
<p>narrowing of the opening moves is useful if you want <a
class="keyword" href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a></p>
<p>choose a <a class="keyword"
href="http://d.hatena.ne.jp/keyword/common">common</a> opening line.</p>
<ul>
<li> book create</li>
</ul>
<p>This command creates the opening book file, "./book.bin", by using</p>
<p>numerous experts' games in a single CSA record file, "./book.csa".</p>
<p>It also uses another CSA record file, "book_anti.csa", where you</p>
<p>can register bad moves that may appear in the experts' games at</p>
<p>the last moves in the record file. Here is the example:</p>
<p>----------------------------------------</p>
<p>PI, +, +6978KI, %TORYO</p>
<p>/</p>
<p>PI, +, +6978KI, -8384FU, %TORYO</p>
<p>/</p>
<p>PI, +, +7776FU, -4132KI, %TORYO</p>
<p>/</p>
<p>PI, +, +7776FU, -4132KI, +2726FU, %TORYO</p>
<p>----------------------------------------</p>
<p>This command becomes effective when MINIMUM macro is not defined</p>
<p>in the <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a>.</p>
<ul>
<li> connect 'addr' 'port' 'id' 'passwd' ['ngame']</li>
</ul>
<p>This command connects <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a> to a <span
class="highlight">shogi</span> server by using the CSA</p>
<p>protocol. The first four arguments specify <a class="keyword"
href="http://d.hatena.ne.jp/keyword/the%20network">the network</a>
address,</p>
<p>port number, user ID, and password, respectively. The last</p>
<p>argument limits a number of games that will be played by <a
class="keyword" href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a>.</p>
<p>This command becomes effective when CSA_LAN macro is defined in</p>
<p>the <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a>.</p>
<ul>
<li> <span class="highlight">dekunobou</span> 'addr' 'port-<span
class="highlight">dekunobou</span>' 'port-<a class="keyword"
href="http://d.hatena.ne.jp/keyword/bonanza">bonanza</a>'</li>
</ul>
<p>This command connects <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a> to <span
class="highlight">Dekunobou</span>.</p>
<ul>
<li> display ['num']</li>
</ul>
<p>This command prints the <span class="highlight">shogi</span>
board. If you want to flip the</p>
<p>board, set 'num' to 2. If not, set it to 1.</p>
<ul>
<li> s</li>
</ul>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a>
makes a prompt <a class="keyword"
href="http://d.hatena.ne.jp/keyword/reply">reply</a> while thinking as
soon as this</p>
<p>command is used.</p>
<ul>
<li> hash 'num'</li>
</ul>
<p>This command is used to initialize the transposition table and</p>
<p>set the size of the table to 2^'num'.</p>
<ul>
<li> hash learn create</li>
</ul>
<p>This command is used to make a zero-filled position-lerning</p>
<p>database, "hash.bin". This command becomes effective when MINIMUM</p>
<p>macro is not defined in the <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a>.</p>
<ul>
<li> hash learn on</li>
<li> hash learn off</li>
</ul>
<p>These commands enable (on) or disable (off) the position learning.</p>
<p>The default is on.</p>
<ul>
<li> learn '<a class="keyword"
href="http://d.hatena.ne.jp/keyword/str">str</a>' 'steps' ['games'
['iterations' ['num1' ['num2'</li>
</ul>
<p>This command optimizes a feature <a class="keyword"
href="http://d.hatena.ne.jp/keyword/vector">vector</a> of the static
evaluation</p>
<p>function by using numorous experts' games in a single CSA record</p>
<p>file, "./records.csa". If you want to use a zero-filled <a
class="keyword" href="http://d.hatena.ne.jp/keyword/vector">vector</a>
as</p>
<p>an initial guess of the optimization procedure, set '<a
class="keyword" href="http://d.hatena.ne.jp/keyword/str">str</a>' to</p>
<p>"ini". If not, set it to "no-ini". The third argument 'games' is a</p>
<p>number of games to be read from the record file. If the third</p>
<p>argument is negative or omitted, all games are read from the file.</p>
<p>The learning method iterates a set of procedures, and the number</p>
<p>of iteration can be limited by the fourth argument. It continues</p>
<p>as long as the argument is negative. The procedures consist of two</p>
<p>parts. The first part reads the record file and creates principal</p>
<p>variations by using 'num1' threads. The default value of 'num1' is</p>
<p>1. The second part renews the feature <a class="keyword"
href="http://d.hatena.ne.jp/keyword/vector">vector</a> 'steps' times by
using</p>
<p>'num2' threads in accord with the principal variations. The
default</p>
<p>value of 'steps' and 'num2' is 1. Note that each thread in the</p>
<p>second procedure uses about 500MByte of the main memory. The two</p>
<p>arguments 'num1' and 'num2' become effective when TLP macro is</p>
<p>defined in the <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a>. After the
procedures, the optimized</p>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/vector">vector</a>
is saved in "./fv.bin". This command become effective when</p>
<p>MINIMUM macro is not defined in the <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a>.</p>
<ul>
<li> limit depth 'num'</li>
</ul>
<p>This command is used to specify a depth, 'num', at which <a
class="keyword" href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a></p>
<p>ends the iterative deepening search.</p>
<ul>
<li> limit nodes 'num'</li>
</ul>
<p>When this command is used, <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a> stops thinking
after searched</p>
<p>nodes <a class="keyword"
href="http://d.hatena.ne.jp/keyword/reach">reach</a> to 'num'.</p>
<ul>
<li> limit time 'minute' 'second' ['depth']</li>
</ul>
<p>This command limits thinking time of <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a>. It tries to
make</p>
<p>each <a class="keyword" href="http://d.hatena.ne.jp/keyword/move">move</a>
by consuming the time 'minute'. When the time is spent</p>
<p>all, it makes each <a class="keyword"
href="http://d.hatena.ne.jp/keyword/move">move</a> in 'second'. The last
argument 'depth' can</p>
<p>be used if you want <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a> to stop
thinking after the iterative</p>
<p>deepening searches <a class="keyword"
href="http://d.hatena.ne.jp/keyword/reach">reach</a> sufficient depth.</p>
<ul>
<li> limit time extendable</li>
<li> limit time strict</li>
</ul>
<p>The command, "limit time extendable", allows <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a> to think</p>
<p>longer than the time limited by the previous command if it wishes</p>
<p>to. The default is "strict".</p>
<ul>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/move">move</a>
['<a class="keyword" href="http://d.hatena.ne.jp/keyword/str">str</a>']</li>
</ul>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a>
makes a <a class="keyword" href="http://d.hatena.ne.jp/keyword/move">move</a>
of '<a class="keyword" href="http://d.hatena.ne.jp/keyword/str">str</a>'.
If the argument is omitted, <a class="keyword"
href="http://d.hatena.ne.jp/keyword/Bonanza">Bonanza</a></p>
<p>thinks of its next <a class="keyword"
href="http://d.hatena.ne.jp/keyword/move">move</a> by itself.</p>
<ul>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/mpv">mpv</a>
num 'nroot'</li>
<li> <a class="keyword" href="http://d.hatena.ne.jp/keyword/mpv">mpv</a>
width 'threshold'</li>
</ul>
<p>These commands control the number of <a class="keyword"
href="http://d.hatena.ne.jp/keyword/root">root</a> moves, 'nroot', to</p>
<p>constitute principal variations. The default number is 1. A <a
class="keyword" href="http://d.hatena.ne.jp/keyword/root">root</a></p>
<p><a class="keyword" href="http://d.hatena.ne.jp/keyword/move">move</a>
that yields a smaller value than the best value by 'threshold'</p>
<p>is neglected. The default threshold is about 200. These commands</p>
<p>become effective when <a class="keyword"
href="http://d.hatena.ne.jp/keyword/MPV">MPV</a> macro is defined in the
<a class="keyword" href="http://d.hatena.ne.jp/keyword/Makefile">Makefile</a>.</p>
<ul>
<li> new ['<a class="keyword"
href="http://d.hatena.ne.jp/keyword/str">str</a>']</li>
</ul>
<p>This command initializes the <span class="highlight">shogi</span>
board. The argument '<a class="keyword"
href="http://d.hatena.ne.jp/keyword/str">str</a>'</p>
<p>controls an initial configuration of the board. If you want to</p>
<p>play a no-handicapped game, set '<a class="keyword"
href="http://d.hatena.ne.jp/keyword/str">str</a>' to "PI" and this is
the</p>
<p>default value. In a handicapped game, specify squares and pieces</p>
<p>to drop, e.g. "new PI82HI22KA" or "new PI19KY".</p>
<ul>
<li> peek on</li>