This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import lzma | |
l = [] | |
with open("staff.txt", "r") as infile: | |
with lzma.open("staff.txt.xz", "w") as outfile: | |
l = infile.read().split(",") | |
outfile.write(json.dumps(l).encode("utf-8") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VERSION = 1.0 | |
CC = gcc | |
CFLAGS = -std=c11 -O3 -pthread | |
SRC = src/*.c | |
OBJ = $(SOURCES:.c=.o) | |
NAME = wyldchess | |
BIN_PATH = binaries/v$(VERSION) | |
EXEC = $(BIN_PATH)/$(TARGET)/$(EXEC_BASE)$(VERSION) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2016 Dan Ravensloft <[email protected]> | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rank Name Elo +/- Games Score Draws | |
1 dorpsgek 163 32 400 71.9% 24.8% | |
2 faile 139 33 400 69.0% 17.5% | |
3 fmax 10 31 400 51.5% 17.5% | |
4 baislicka -8 31 400 48.9% 17.2% | |
5 pigeon -407 50 400 8.8% 11.0% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int * vector = dirs[<piece>]; | |
while (*vector != 0) { | |
int nextsq = currsq + *vector; | |
while (board[nextsq] != OFFBOARD) { | |
AddMove(currsq, nextsq, <whatever>); | |
if (board[nextsq] != EMPTY || !slide[<piece>]) | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Board[dest sq] = Board[from sq] | |
Board[from sq] = valid empty sq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
const ( | |
MoveQuiet byte = iota | |
) | |
type Move struct { | |
From byte | |
To byte | |
Kind byte |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const char Vector[5][8] = { | |
{ +10, +11, +1, -9, -10, -11, -1, +9 }, // K | |
{ +10, +11, +1, -9, -10, -11, -1, +9 }, // Q | |
{ +10, +1, -10, -1, 0, 0, 0, 0 }, // R | |
{ +11, -9, -11, +9, 0, 0, 0, 0 }, // B | |
{ +21, +12, -8, -19, -21, -12, +8, +19 } // N | |
}; | |
const char Slide[5] = { | |
0, 1, 1, 1, 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This is what I do at the moment for a knight. */ | |
void GenKnightBitlist(struct Board * b, int tmp, int from) | |
{ | |
int i, j, col; | |
i = from; | |
col = FILE (i); | |
j = i - 6; | |
if (j >= 0 && col < 6) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Flat profile: | |
Each sample counts as 0.01 seconds. | |
% cumulative self self total | |
time seconds seconds calls ms/call ms/call name | |
23.62 12.68 12.68 125048905 0.00 0.00 RecalculateAttacks | |
15.57 21.04 8.36 _mcount_private | |
14.83 29.00 7.96 400 19.90 99.15 Perft.part.0.constprop.4 | |
12.85 35.90 6.90 33815901 0.00 0.00 RecalculateAttacksFromScratch | |
11.14 41.88 5.98 749625666 0.00 0.00 GenBishopBitlist |
OlderNewer