Skip to content

Commit 9517109

Browse files
committed
YaneuraOu-feature-sfnnwoP1536のファイルに差し替えた。
1 parent 5937b22 commit 9517109

File tree

5 files changed

+1301
-28
lines changed

5 files changed

+1301
-28
lines changed

YaneuraOu/.gitignore

Lines changed: 247 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,250 @@
1-
ここにあった更新履歴は、やねうら王Wikiに移動しました。
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
23

3-
やねうら王 Wiki : https://github.com/yaneurao/YaneuraOu/wiki/
4+
# added by yaneurao
45

5-
やねうら王の更新履歴 - やねうら王 Wiki : https://github.com/yaneurao/YaneuraOu/wiki/%E3%82%84%E3%81%AD%E3%81%86%E3%82%89%E7%8E%8B%E3%81%AE%E6%9B%B4%E6%96%B0%E5%B1%A5%E6%AD%B4
6+
# *.gitattributes
7+
# *.gitignore
8+
*.bat
9+
*.rb
10+
YaneuraOu_backup*.lnk
11+
バージョン履歴.txt
12+
実験記録*.txt
13+
開発メモ2017.txt
14+
コマンドのメモ.txt
15+
*.bak
16+
*Private.*
17+
*.vspx
18+
*~
19+
~*
20+
.*/
21+
!.github/
22+
*.nnue
23+
*.nnue.*
24+
*.result.txt
625

7-
リンクの貼り替えに御協力お願い致しますm(_ _)m
26+
# embedded_nnue.cpp
27+
embedded_nnue.cpp
28+
29+
# experimental
30+
31+
evaluate_experimental.*
32+
33+
# cf. https://twitter.com/496_/status/673758920846917632
34+
YaneuraOu.VC.opendb
35+
YaneuraOu.VC.db
36+
YaneuraOu.VC.VC.opendb
37+
38+
39+
# User-specific files
40+
*.suo
41+
*.user
42+
*.userosscache
43+
*.sln.docstates
44+
45+
# User-specific files (MonoDevelop/Xamarin Studio)
46+
*.userprefs
47+
48+
# Build results
49+
[Dd]ebug/
50+
[Dd]ebugPublic/
51+
[Rr]elease/
52+
[Rr]eleases/
53+
x64/
54+
x86/
55+
build/
56+
bld/
57+
[Bb]in/
58+
[Oo]bj/
59+
exe/
60+
npmpackages/**/lib/*
61+
62+
# Visual Studio 2015 cache/options directory
63+
.vs/
64+
enc_temp_folder
65+
66+
# MSTest test Results
67+
[Tt]est[Rr]esult*/
68+
[Bb]uild[Ll]og.*
69+
70+
# NUNIT
71+
*.VisualState.xml
72+
TestResult.xml
73+
74+
# Build Results of an ATL Project
75+
[Dd]ebugPS/
76+
[Rr]eleasePS/
77+
dlldata.c
78+
79+
# DNX
80+
project.lock.json
81+
artifacts/
82+
83+
*_i.c
84+
*_p.c
85+
*_i.h
86+
*.ilk
87+
*.meta
88+
*.obj
89+
*.pch
90+
*.pdb
91+
*.pgc
92+
*.pgd
93+
*.rsp
94+
*.sbr
95+
*.tlb
96+
*.tli
97+
*.tlh
98+
*.tmp
99+
*.tmp_proj
100+
*.log
101+
*.vspscc
102+
*.vssscc
103+
.builds
104+
*.pidb
105+
*.svclog
106+
*.scc
107+
108+
# Chutzpah Test files
109+
_Chutzpah*
110+
111+
# Visual C++ cache files
112+
ipch/
113+
*.aps
114+
*.ncb
115+
*.opensdf
116+
*.sdf
117+
*.cachefile
118+
119+
# Visual Studio profiler
120+
*.psess
121+
*.vsp
122+
*.vspx
123+
124+
# TFS 2012 Local Workspace
125+
$tf/
126+
127+
# Guidance Automation Toolkit
128+
*.gpState
129+
130+
# ReSharper is a .NET coding add-in
131+
_ReSharper*/
132+
*.[Rr]e[Ss]harper
133+
*.DotSettings.user
134+
135+
# JustCode is a .NET coding add-in
136+
.JustCode
137+
138+
# TeamCity is a build add-in
139+
_TeamCity*
140+
141+
# DotCover is a Code Coverage Tool
142+
*.dotCover
143+
144+
# NCrunch
145+
_NCrunch_*
146+
.*crunch*.local.xml
147+
148+
# MightyMoose
149+
*.mm.*
150+
AutoTest.Net/
151+
152+
# Web workbench (sass)
153+
.sass-cache/
154+
155+
# Installshield output folder
156+
[Ee]xpress/
157+
158+
# DocProject is a documentation generator add-in
159+
DocProject/buildhelp/
160+
DocProject/Help/*.HxT
161+
DocProject/Help/*.HxC
162+
DocProject/Help/*.hhc
163+
DocProject/Help/*.hhk
164+
DocProject/Help/*.hhp
165+
DocProject/Help/Html2
166+
DocProject/Help/html
167+
168+
# Click-Once directory
169+
publish/
170+
171+
# Publish Web Output
172+
*.[Pp]ublish.xml
173+
*.azurePubxml
174+
## TODO: Comment the next line if you want to checkin your
175+
## web deploy settings but do note that will include unencrypted
176+
## passwords
177+
#*.pubxml
178+
179+
*.publishproj
180+
181+
# NuGet Packages
182+
*.nupkg
183+
# The packages folder can be ignored because of Package Restore
184+
**/packages/*
185+
# except build/, which is used as an MSBuild target.
186+
!**/packages/build/
187+
# Uncomment if necessary however generally it will be regenerated when needed
188+
#!**/packages/repositories.config
189+
190+
# Windows Azure Build Output
191+
csx/
192+
*.build.csdef
193+
194+
# Windows Store app package directory
195+
AppPackages/
196+
197+
# Visual Studio cache files
198+
# files ending in .cache can be ignored
199+
*.[Cc]ache
200+
# but keep track of directories ending in .cache
201+
!*.[Cc]ache/
202+
203+
# Others
204+
ClientBin/
205+
[Ss]tyle[Cc]op.*
206+
~$*
207+
*~
208+
*.dbmdl
209+
*.dbproj.schemaview
210+
*.pfx
211+
*.publishsettings
212+
node_modules/
213+
orleans.codegen.cs
214+
215+
# RIA/Silverlight projects
216+
Generated_Code/
217+
218+
# Backup & report files from converting an old project file
219+
# to a newer Visual Studio version. Backup files are not needed,
220+
# because we have git ;-)
221+
_UpgradeReport_Files/
222+
Backup*/
223+
UpgradeLog*.XML
224+
UpgradeLog*.htm
225+
226+
# SQL Server files
227+
*.mdf
228+
*.ldf
229+
230+
# Business Intelligence projects
231+
*.rdl.data
232+
*.bim.layout
233+
*.bim_*.settings
234+
235+
# Microsoft Fakes
236+
FakesAssemblies/
237+
238+
# Node.js Tools for Visual Studio
239+
.ntvs_analysis.dat
240+
241+
# Visual Studio 6 build log
242+
*.plg
243+
244+
# Visual Studio 6 workspace options file
245+
*.opt
246+
247+
# LightSwitch generated files
248+
GeneratedArtifacts/
249+
_Pvt_Extensions/
250+
ModelManifest.xml

YaneuraOu/CONTRIBUTING.md

Lines changed: 101 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,105 @@
1-
ここにあったテキストは、やねうら王Wikiに移動しました。
1+
# やねうら王のソースコードのルール
22

3-
やねうら王Wiki
4-
https://github.com/yaneurao/YaneuraOu/wiki
3+
ここに書いてあることは、やねうらお(やねうら王開発者)が、やねうら王のソースコードを書く時にこのルールで書いているというルールの説明であり、プルリクするときにこれらのルールを守る必要はありません。(守ってもらえていると嬉しいですが…)
54

6-
やねうら王のインストール手順 - やねうら王Wiki
7-
https://github.com/yaneurao/YaneuraOu/wiki/%E3%82%84%E3%81%AD%E3%81%86%E3%82%89%E7%8E%8B%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E6%89%8B%E9%A0%86
5+
ソースコードを読んで動作について理解しようと思う時に、ここに書いてあるルールを知っていると役に立つと思います。
86

9-
リンク貼り替えにご協力お願い致します。m(_ _)m
7+
## 絵文字について
108

9+
やねうら王では、以下のルールでこれらの絵文字を使っていますが、厳密なルールではないです。
10+
11+
|絵文字|読み方|意味|備考|
12+
|-|-|-|-|
13+
|🌈|にじ| やねうら王独自|独自の改良、改造など|
14+
|🤔|かんがえ| やねうらおの考え |深い洞察に基づく|
15+
|📓|のーと | 解説記事 | 長文 |
16+
|📝|えんぴつ| メモ書き | 備忘録 |
17+
|📌|おしぴん| 強調したいメモ |目立たせたいメモ書き|
18+
|💡|でんきゅう| 読む人のためのヒント| 読む人への配慮 |
19+
||ちゅうい| 注意事項 | 致命的なバグになりうる |
20+
21+
### ブロックを示す絵文字
22+
23+
> // 🌈 やねうら王独自 🌈
24+
25+
のように両端に絵文字がある場合、そこ以降、次のブロックまで(通例5~20行)それが継続することを意味します。(ブロックの定義は曖昧ですが、ここでは何かのまとまりをブロックと呼んでいます。)
26+
27+
## Stockfishのソースコードを持ってくる場合
28+
29+
Stockfishからソースコードをコピーしてきたものを改変して使用する場合、
30+
31+
```
32+
#if STOCKFISH
33+
元のStockfishのコード
34+
#else
35+
改変したStockfishのコード
36+
#endif
37+
```
38+
39+
のように、`#if STOCKFISH``#else``#endif`で書いて、元のソースコードに対して、どう改変されているのかがわかるように示します。
40+
41+
Stockfishのコメントに書かれている英文については、日本語に適宜翻訳しています。
42+
43+
```
44+
例)
45+
// Non-main threads go directly to iterative_deepening()
46+
// メインスレッド以外は直接 iterative_deepening() へ進む
47+
48+
if (!is_mainthread())
49+
{
50+
iterative_deepening();
51+
return;
52+
}
53+
```
54+
55+
## namespaceについて
56+
57+
ただし、`namespace Stockfish`に関しては、上のルールは無視して、`namespace YaneuraOu`と変更します。
58+
59+
また、StockfishからNNUEのコードを持ってくる(これは逆輸入)する場合、やねうら王では、この逆輸入されたNNUEのことをSFNN(Stockfish NNUE)と呼んでいるので、`namespace NNUE``namespace SFNN`と変更します。
60+
61+
## でスコープを閉じるとき
62+
63+
namespaceを閉じるとき以下のように名前空間名を`// namespace`のあとに書きます。
64+
```
65+
namespace YaneuraOu {
66+
namespace {
67+
68+
} // namespace
69+
} // namespace YaneuraOu
70+
```
71+
72+
同様に、中身の行数が長いwhileを閉じる時もコメントでそのことを示すことがあります。
73+
74+
```
75+
while (...) {
76+
77+
// すごく長い行数
78+
79+
} // while
80+
```
81+
82+
また、`#if``#endif`に関しても長くなる時は、コメントでそのことを示すことがあります。
83+
84+
```
85+
#if defined(USE_CLASSIC_EVAL)
86+
87+
// すごく長い行数
88+
89+
#endif // defined(USE_CLASSIC_EVAL)
90+
```
91+
92+
## ソースコードのフォーマット
93+
94+
基本的には`source/.clang-format`を適用してください。
95+
96+
Stockfishでは、
97+
```
98+
stop = false
99+
starting = false
100+
```
101+
のように`=`などのindentを揃えることが多いです。
102+
103+
また、namespaceはindentなしとなっています。(Visual Studioが勝手にindentする場合、Visual StudioのC++の書式設定で調整してください。)
104+
105+
.clang-formatを適用すると半自動的に以上のようになりますが、ならないことがあるので、意識してみてください。

0 commit comments

Comments
 (0)