diff options
| author | tslil clingman <tslil@posteo.de> | 2021-01-28 21:30:30 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | a77062ce3dc9a99ad0662010cc7eeb00dd5036a6 (patch) | |
| tree | 6936b60eb7a8221d38886d0db11953fe6ee56f23 /src | |
| parent | 473797d820b3b224ee1d370a50e4bcd01d09d48e (diff) | |
Added license information!
Diffstat (limited to 'src')
| -rw-r--r-- | src/ct1986.c | 31 | ||||
| -rw-r--r-- | src/ctaklm.c | 30 | ||||
| -rw-r--r-- | src/pptdb.c | 32 | ||||
| -rw-r--r-- | src/train5.py | 18 |
4 files changed, 104 insertions, 7 deletions
diff --git a/src/ct1986.c b/src/ct1986.c index 213f3ff..0872ca7 100644 --- a/src/ct1986.c +++ b/src/ct1986.c @@ -1,3 +1,23 @@ +/* + ct1986, an interface to the ctak library designed to be embedded on + a Raspberry Pi Zero + + Copyright (C) 2021, tslil clingman + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. +*/ + #include <stdlib.h> #include <string.h> @@ -137,11 +157,18 @@ input_is_not_turn(const char *line) { return EXIT_SUCCESS; } -int -main(int argc, char **argv) { +const char* license = "ct1986, an interface to the ctak library designed to be embedded on a Raspberry Pi Zero\n\ +\n\ +Copyright (C) 2021, tslil clingman\n\ +\n\ +This program comes with ABSOLUTELY NO WARRANTY; and is made available under the terms of the GNU GPL v3 license. This is free software, and you are welcome to redistribute it under certain conditions; see COPYING for details.\n"; + +int main(int argc, char **argv) { (void)(argc); (void)(argv); + puts(license); + if (lcd_begin() != EXIT_SUCCESS) return EXIT_FAILURE; diff --git a/src/ctaklm.c b/src/ctaklm.c index e0022d1..4ef02be 100644 --- a/src/ctaklm.c +++ b/src/ctaklm.c @@ -1,3 +1,22 @@ +/* + ctaklm, a line mode interface to the ctak library + + Copyright (C) 2021, tslil clingman + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. +*/ + #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -409,11 +428,18 @@ info, load, log, new, play (b|w), self-play, square <col><row>, <PTN>."); return EXIT_SUCCESS; } -int -main(int argc, char **argv) { +const char* license = "ctaklm, a line mode interface to the ctak library\n\ +\n\ +Copyright (C) 2021, tslil clingman\n\ +\n\ +This program comes with ABSOLUTELY NO WARRANTY; and is made available under the terms of the GNU GPL v3 license. This is free software, and you are welcome to redistribute it under certain conditions; see COPYING for details.\n"; + +int main(int argc, char **argv) { (void)(argc); (void)(argv); + puts(license); + negamax_search_depth = 3; new_game(5); negamax_init(5); diff --git a/src/pptdb.c b/src/pptdb.c index 0c8673d..b5bdfa4 100644 --- a/src/pptdb.c +++ b/src/pptdb.c @@ -1,3 +1,23 @@ +/* + pptdb, generate neural network training data from a playtak.com + database dump + + Copyright (C) 2021, tslil clingman + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. +*/ + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -113,7 +133,8 @@ parse_line(const char *pt, const ssize_t read) { } } } - // Generate training data, not too early in the game + // Generate training data, not too early in the game, random + // orientation if (generate && ply + 4 >= total_plies) { int dx = (rand()&1)?-1:+1; int dy = (rand()&1)?-1:+1; @@ -127,8 +148,13 @@ parse_line(const char *pt, const ssize_t read) { return ACT_OK; } -int -main(int argc, char **argv) { +const char* license = "pptdb, generate neural network training data from a playtak.com database dump\n\ +\n\ +Copyright (C) 2021, tslil clingman\n\ +\n\ +This program comes with ABSOLUTELY NO WARRANTY; and is made available under the terms of the GNU GPL v3 license. This is free software, and you are welcome to redistribute it under certain conditions; see COPYING for details.\n"; + +int main(int argc, char **argv) { (void)(argc); enum E_RESULT r; diff --git a/src/train5.py b/src/train5.py index 3683c1e..25b1aab 100644 --- a/src/train5.py +++ b/src/train5.py @@ -1,3 +1,21 @@ +# train5.py, train a small CNN to recognise winning Tak positions +# +# Copyright (C) 2021, tslil clingman +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. + + # Loading data import pandas as pd import numpy as np |
