Hi all
Maybe someone here remembers Firstchess "FirstChess, a very simple open source chess program with a command line interface written by Nguyen Hong Pham (surname) in C for didactic purpose, introduced in 2002"
https://github.com/nguyenpham/FirstChess
I'm wondering whether something similar, written in C/C++ but with bitboards exists.
Thanks in advance
Emilio
A very simple engine in C/C++ using bitboards?
Moderators: hgm, Rebel, chrisw
-
- Posts: 238
- Joined: Tue Jul 12, 2011 1:31 pm
A very simple engine in C/C++ using bitboards?
Two first meanings of the dutch word "leren":
1. leren [vc] (learn, larn, acquire) acquire or gain knowledge or skills.
2. leren [v] (teach, learn, instruct) impart skills or knowledge to.
1. leren [vc] (learn, larn, acquire) acquire or gain knowledge or skills.
2. leren [v] (teach, learn, instruct) impart skills or knowledge to.
-
- Posts: 4606
- Joined: Wed Oct 01, 2008 6:33 am
- Location: Regensburg, Germany
- Full name: Guenther Simon
Re: A very simple engine in C/C++ using bitboards?
e.g. Winglet (original site does not exist anymore - thus the wayback link)pocopito wrote: ↑Mon Oct 01, 2018 3:35 pm Hi all
Maybe someone here remembers Firstchess "FirstChess, a very simple open source chess program with a command line interface written by Nguyen Hong Pham (surname) in C for didactic purpose, introduced in 2002"
https://github.com/nguyenpham/FirstChess
I'm wondering whether something similar, written in C/C++ but with bitboards exists.
Thanks in advance
Emilio
http://web.archive.org/web/201206211002 ... m/winglet/
-
- Posts: 803
- Joined: Mon Jul 17, 2006 5:53 am
- Full name: Edsel Apostol
Re: A very simple engine in C/C++ using bitboards?
You can try this one. This is when I'm just starting to learn programming in College.pocopito wrote: ↑Mon Oct 01, 2018 3:35 pm Hi all
Maybe someone here remembers Firstchess "FirstChess, a very simple open source chess program with a command line interface written by Nguyen Hong Pham (surname) in C for didactic purpose, introduced in 2002"
https://github.com/nguyenpham/FirstChess
I'm wondering whether something similar, written in C/C++ but with bitboards exists.
Thanks in advance
Emilio
https://github.com/ed-apostol/TwistedLo ... /Logic18.c
Edsel Apostol
https://github.com/ed-apostol/InvictusChess
https://github.com/ed-apostol/InvictusChess
-
- Posts: 12540
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: A very simple engine in C/C++ using bitboards?
Olithink.pocopito wrote: ↑Mon Oct 01, 2018 3:35 pm Hi all
Maybe someone here remembers Firstchess "FirstChess, a very simple open source chess program with a command line interface written by Nguyen Hong Pham (surname) in C for didactic purpose, introduced in 2002"
https://github.com/nguyenpham/FirstChess
I'm wondering whether something similar, written in C/C++ but with bitboards exists.
Thanks in advance
Emilio
From here:
http://brausch.org/home/chess/index.html
This link:
http://brausch.org/home/chess/OliThink533.src.zip
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
-
- Posts: 88
- Joined: Thu Oct 06, 2016 9:17 pm
- Location: India
Re: A very simple engine in C/C++ using bitboards?
Check out Teki:
https://github.com/Mk-Chan/Teki
It uses the classical bitboard approach (non-magic/rotated).
https://github.com/Mk-Chan/Teki
It uses the classical bitboard approach (non-magic/rotated).
-
- Posts: 10282
- Joined: Thu Mar 09, 2006 12:37 am
- Location: Tel-Aviv Israel
Re: A very simple engine in C/C++ using bitboards?
Thanks for this linkGuenther wrote: ↑Mon Oct 01, 2018 4:50 pme.g. Winglet (original site does not exist anymore - thus the wayback link)pocopito wrote: ↑Mon Oct 01, 2018 3:35 pm Hi all
Maybe someone here remembers Firstchess "FirstChess, a very simple open source chess program with a command line interface written by Nguyen Hong Pham (surname) in C for didactic purpose, introduced in 2002"
https://github.com/nguyenpham/FirstChess
I'm wondering whether something similar, written in C/C++ but with bitboards exists.
Thanks in advance
Emilio
http://web.archive.org/web/201206211002 ... m/winglet/
I started to try to follow the steps
I have some problem in step 5.
int _tmain(int argc, _TCHAR* argv[])
{
printf("hello, I am your new friend!\n");
return 0;
}
This code produce errors when I compile it.
Severity Code Description Project File Line Suppression State
Error (active) E0020 identifier "_TCHAR" is undefined chess_project C:\Users\UriBlass\source\repos\chess_project\chess_project\main.cpp 2
Severity Code Description Project File Line Suppression State
Error (active) E0020 identifier "printf" is undefined chess_project C:\Users\UriBlass\source\repos\chess_project\chess_project\main.cpp 5
Note that
I have no errors with the following code that does what it is supposed to do and maybe the code that they suggest is only relevant for visual C++2010 and not for visual C++2017.
#include <iostream>
int main()
{
printf("hello, I am your new friend!\n");
return 0;
}
Edit:
I guess that the following comment in step 5 is also not relevant for people who use Visual C++ 2017
"Visual Studio C++ Express does not come with 64-bit compilers.
If you want to build your executable for a 64-bit platform, then I suggest searching the internet for "how to configure Visual C++ Projects to Target 64-Bit Platforms". This will lead you to Microsoft's site with more information. "
Am I right?
-
- Posts: 268
- Joined: Sun Apr 24, 2011 12:33 am
Re: A very simple engine in C/C++ using bitboards?
I personally don't recommend that tutorial because it's focused on programming in Windows, also it's outdated, the code it's too repetitive and mix c with c++Uri Blass wrote: ↑Wed Oct 03, 2018 12:19 amThanks for this linkGuenther wrote: ↑Mon Oct 01, 2018 4:50 pme.g. Winglet (original site does not exist anymore - thus the wayback link)pocopito wrote: ↑Mon Oct 01, 2018 3:35 pm Hi all
Maybe someone here remembers Firstchess "FirstChess, a very simple open source chess program with a command line interface written by Nguyen Hong Pham (surname) in C for didactic purpose, introduced in 2002"
https://github.com/nguyenpham/FirstChess
I'm wondering whether something similar, written in C/C++ but with bitboards exists.
Thanks in advance
Emilio
http://web.archive.org/web/201206211002 ... m/winglet/
I started to try to follow the steps
I have some problem in step 5.
int _tmain(int argc, _TCHAR* argv[])
{
printf("hello, I am your new friend!\n");
return 0;
}
This code produce errors when I compile it.
Severity Code Description Project File Line Suppression State
Error (active) E0020 identifier "_TCHAR" is undefined chess_project C:\Users\UriBlass\source\repos\chess_project\chess_project\main.cpp 2
Severity Code Description Project File Line Suppression State
Error (active) E0020 identifier "printf" is undefined chess_project C:\Users\UriBlass\source\repos\chess_project\chess_project\main.cpp 5
Note that
I have no errors with the following code that does what it is supposed to do and maybe the code that they suggest is only relevant for visual C++2010 and not for visual C++2017.
#include <iostream>
int main()
{
printf("hello, I am your new friend!\n");
return 0;
}
Edit:
I guess that the following comment in step 5 is also not relevant for people who use Visual C++ 2017
"Visual Studio C++ Express does not come with 64-bit compilers.
If you want to build your executable for a 64-bit platform, then I suggest searching the internet for "how to configure Visual C++ Projects to Target 64-Bit Platforms". This will lead you to Microsoft's site with more information. "
Am I right?
I learned chess programming and C programming watching the VICE series (the source code it's a bit a mess but at the end you will learn), it's developed in C99, you can develop C99 in Visual Studio with just changing the source files to .c VS will compile as C code (since VS 2013 support C99) VS 2017 seems to still support C99, just using a few macros you can get a fully functional chess program in Windows, Linux and macOS
Skiull http://skiull.blogspot.com
-
- Posts: 803
- Joined: Mon Jul 17, 2006 5:53 am
- Full name: Edsel Apostol
Re: A very simple engine in C/C++ using bitboards?
Try also this one. My early versions from 2005. This is a working xboard engine:pocopito wrote: ↑Mon Oct 01, 2018 3:35 pm Hi all
Maybe someone here remembers Firstchess "FirstChess, a very simple open source chess program with a command line interface written by Nguyen Hong Pham (surname) in C for didactic purpose, introduced in 2002"
https://github.com/nguyenpham/FirstChess
I'm wondering whether something similar, written in C/C++ but with bitboards exists.
Thanks in advance
Emilio
https://github.com/ed-apostol/TwistedLo ... c/omega9.c
Edsel Apostol
https://github.com/ed-apostol/InvictusChess
https://github.com/ed-apostol/InvictusChess
-
- Posts: 238
- Joined: Tue Jul 12, 2011 1:31 pm
Re: A very simple engine in C/C++ using bitboards?
[/quote]
Try also this one. My early versions from 2005. This is a working xboard engine:
https://github.com/ed-apostol/TwistedLo ... c/omega9.c
[/quote]
This one doesn't compile
$ gcc -o omega9 omega9.c
omega9.c: In function ‘gettime’:
omega9.c:533:5: warning: implicit declaration of function ‘_ftime’; did you mean ‘ftime’? [-Wimplicit-function-declaration]
_ftime(&tv);
^~~~~~
ftime
omega9.c:534:15: error: invalid use of undefined type ‘struct _timeb’
return (tv.time * 1000 + tv.millitm);
^
omega9.c:534:32: error: invalid use of undefined type ‘struct _timeb’
return (tv.time * 1000 + tv.millitm);
^
omega9.c: In function ‘displayb’:
omega9.c:927:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
printf("%d.%s%s c: %d castle: %d ep square: %d eval: %d fifty: %d \n",
~^
%ld
(status - H) / 2 + (o ? 1 : 0), o ? " " : " ...", displaymove((status - 1)->m),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
omega9.c: At top level:
omega9.c:148:15: error: storage size of ‘tv’ isn’t known
struct _timeb tv;
^~
Try also this one. My early versions from 2005. This is a working xboard engine:
https://github.com/ed-apostol/TwistedLo ... c/omega9.c
[/quote]
This one doesn't compile
$ gcc -o omega9 omega9.c
omega9.c: In function ‘gettime’:
omega9.c:533:5: warning: implicit declaration of function ‘_ftime’; did you mean ‘ftime’? [-Wimplicit-function-declaration]
_ftime(&tv);
^~~~~~
ftime
omega9.c:534:15: error: invalid use of undefined type ‘struct _timeb’
return (tv.time * 1000 + tv.millitm);
^
omega9.c:534:32: error: invalid use of undefined type ‘struct _timeb’
return (tv.time * 1000 + tv.millitm);
^
omega9.c: In function ‘displayb’:
omega9.c:927:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
printf("%d.%s%s c: %d castle: %d ep square: %d eval: %d fifty: %d \n",
~^
%ld
(status - H) / 2 + (o ? 1 : 0), o ? " " : " ...", displaymove((status - 1)->m),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
omega9.c: At top level:
omega9.c:148:15: error: storage size of ‘tv’ isn’t known
struct _timeb tv;
^~
Two first meanings of the dutch word "leren":
1. leren [vc] (learn, larn, acquire) acquire or gain knowledge or skills.
2. leren [v] (teach, learn, instruct) impart skills or knowledge to.
1. leren [vc] (learn, larn, acquire) acquire or gain knowledge or skills.
2. leren [v] (teach, learn, instruct) impart skills or knowledge to.
-
- Posts: 919
- Joined: Tue Nov 24, 2015 9:11 pm
- Location: upstate
Re: A very simple engine in C/C++ using bitboards?
Compiles without errors with MinGW GCC 5.3.0 into a.exe -- attached.
Tirsa Poppins
CCRL
CCRL