Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,33 @@
|
|||
getlayout=:3 :0
|
||||
whilst. NB. first two positions are non-adjacent kings
|
||||
(0{pos) e. (1{pos)+(,-)1 7 8 9
|
||||
do.
|
||||
pos=: y?64
|
||||
end.
|
||||
)
|
||||
|
||||
randboard=:3 :0
|
||||
n=: ?30 NB. number of non-king pieces on board
|
||||
layout=: getlayout 2+n NB. where they go
|
||||
white=: 0 1,?n#2 NB. which ones are white?
|
||||
pawns=: 0 0,?n#2 NB. where are the pawns?
|
||||
pawns=: pawns * 1- white*layout e.56+i.8
|
||||
pawns=: pawns * 1-(1-white)*layout e.i.8
|
||||
ptyp=: 'pkqbjnPKQBJN'{~(6*white)+1 1,(1-2}.pawns)*2+?n#4
|
||||
8 8$ptyp layout}64#'.'
|
||||
)
|
||||
|
||||
NB. fen compress a line
|
||||
fen1=:3 :0
|
||||
for_n.8-i.8 do.
|
||||
y=. y rplc (#&'.';":) n
|
||||
end.
|
||||
)
|
||||
|
||||
NB. translate 8x8 board to fen notation
|
||||
NB. (just the task specific crippled fen)
|
||||
b2fen=:3 :0
|
||||
(}.;|.<@(('/',fen1)"1) y),' w - - 0 1'
|
||||
)
|
||||
|
||||
randfen=:b2fen@randboard
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
randfen''
|
||||
q6J/1pb1p1p1/1Jq2k2/4p1Pp/1pP5/1K2Bp2/5p2/1P4P1 w - - 0 1
|
||||
randfen''
|
||||
1Q3Q2/1Kn5/1PP5/2P5/2kNq1J1/7J/1P6/8 w - - 0 1
|
||||
randfen''
|
||||
8/8/7K/8/8/8/k7/8 w - - 0 1
|
||||
randfen''
|
||||
p4n2/1Q6/8/8/8/p4k1K/8/P5Qn w - - 0 1
|
||||
randfen''
|
||||
bk1q3J/8/1N4K1/N3P3/3BQ3/j1P3P1/7P/5jq1 w - - 0 1
|
||||
randfen''
|
||||
b1Q1Bb1J/j1N1PpK1/PpB1P1Pp/2pp2PN/3nnk2/3J4/P6P/1N2Qb1J w - - 0 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue