| View previous topic :: View next topic |
| Author |
Message |
Justin Blanchard
Joined: 18 Dec 2009 Posts: 316 Location: Naperville, IL
|
Post subject: Re: New Year's resolution: a chess engine written in BASH sc Posted: Wed Feb 03, 2010 1:24 am |
|
|
| benstoker wrote: |
| In the meantime, can you tell me where I can insert a loop counter (let node=node+1) to get a count of the nodes? I aint too smart and caint figer it out. |
Sure. You can zero it in the go() function and increment it at the start of the score() function (before the "if (( DEPTH <= 0 )) || [ -n "$TRICK" ]" clause). I think the hard part is timing the search in pure bash (I think you have to parse the output of "times" before&after and do some math) so you can report the nps.
| benstoker wrote: |
| One other thing. This is not as useless as you imply. This is a pedagogical chess engine. In my view, it's the best one because it's so absolutely basic. Extra comments to explain what's going on would be the final selling point. |
Thanks, but I disagree. There's too much code spent fighting the language; it obscures the tiny amount of code spent on chess. The search and eval also aren't orthogonal enough from the board rep. If I wanted to write a good intro engine, I'd use a rapid language (perl+moose, python, ruby) with basic square/board/move classes. Better yet, I'd see if somebody's done this already.  |
|
| Back to top |
|
 |
|
| Subject |
Author |
Date/Time |
New Year's resolution: a chess engine written in BASH script |
Ben Stoker |
Fri Jan 22, 2010 4:16 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Louis Zulli |
Fri Jan 22, 2010 5:40 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Louis Zulli |
Fri Jan 22, 2010 5:44 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Ben Stoker |
Fri Jan 22, 2010 6:50 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
H.G.Muller |
Fri Jan 22, 2010 6:57 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Michael Sherwin |
Fri Jan 22, 2010 7:12 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Ben Stoker |
Fri Jan 22, 2010 7:48 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
H.G.Muller |
Sat Jan 23, 2010 10:24 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Don Dailey |
Fri Jan 22, 2010 9:46 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Louis Zulli |
Fri Jan 22, 2010 10:04 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Dann Corbit |
Fri Jan 22, 2010 10:06 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Robert Hyatt |
Sat Jan 23, 2010 2:37 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Greg Simpson |
Sat Jan 23, 2010 6:14 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Stuart Cracraft |
Wed Feb 03, 2010 4:00 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Gregory Strong |
Sat Jan 23, 2010 8:17 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Edmund Moshammer |
Sat Jan 23, 2010 9:37 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Gregory Strong |
Sat Jan 23, 2010 11:31 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Edmund Moshammer |
Sun Jan 24, 2010 5:59 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Gregory Strong |
Sun Jan 24, 2010 5:29 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Ian Osgood |
Fri Jan 29, 2010 8:46 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Stuart Cracraft |
Sat Jan 23, 2010 9:00 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Matt Shoemaker |
Sun Jan 24, 2010 12:47 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Stuart Cracraft |
Wed Feb 03, 2010 3:56 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Don Dailey |
Thu Feb 04, 2010 2:45 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Tord Romstad |
Thu Feb 04, 2010 7:10 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Don Dailey |
Thu Feb 04, 2010 7:38 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Matthew Hull |
Thu Feb 04, 2010 8:58 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
William H. Rogers |
Fri Feb 05, 2010 12:47 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Don Dailey |
Fri Feb 05, 2010 12:53 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Matt Shoemaker |
Fri Feb 05, 2010 3:48 am |
Re: New Year's resolution: a chess engine written in BASH sc |
William H. Rogers |
Sat Feb 06, 2010 2:14 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Don Dailey |
Sat Feb 06, 2010 2:54 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Don Dailey |
Sat Feb 06, 2010 3:23 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Luca Hemmerich |
Sun Feb 07, 2010 6:50 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Justin Blanchard |
Sun Feb 07, 2010 11:10 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Karatorian |
Sun Feb 14, 2010 4:49 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Matt Shoemaker |
Sun Feb 14, 2010 8:24 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Aaron Becker |
Sun Feb 14, 2010 10:44 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Dann Corbit |
Mon Jan 25, 2010 7:45 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Justin Blanchard |
Sat Jan 30, 2010 12:51 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Justin Blanchard |
Sun Jan 31, 2010 9:43 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Don Dailey |
Sun Jan 31, 2010 1:50 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Justin Blanchard |
Sun Jan 31, 2010 10:42 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Michel Van den Bergh |
Sun Jan 31, 2010 11:09 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
J. Wesley Cleveland |
Sun Jan 31, 2010 11:19 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Justin Blanchard |
Sun Jan 31, 2010 11:36 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Matt Shoemaker |
Mon Feb 01, 2010 12:22 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Michel Van den Bergh |
Mon Feb 01, 2010 12:35 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Don Dailey |
Mon Feb 01, 2010 12:49 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Justin Blanchard |
Mon Feb 01, 2010 12:51 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Michel Van den Bergh |
Mon Feb 01, 2010 1:01 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Justin Blanchard |
Mon Feb 01, 2010 1:05 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Justin Blanchard |
Mon Feb 01, 2010 1:40 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Michel Van den Bergh |
Mon Feb 01, 2010 1:56 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Justin Blanchard |
Tue Feb 02, 2010 12:24 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Ben Stoker |
Tue Feb 02, 2010 8:05 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Justin Blanchard |
Wed Feb 03, 2010 1:24 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Ben Stoker |
Tue Feb 02, 2010 8:08 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Michel Van den Bergh |
Wed Feb 03, 2010 10:39 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Justin Blanchard |
Wed Feb 03, 2010 10:49 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Don Dailey |
Wed Feb 03, 2010 1:42 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Ben Stoker |
Wed Feb 03, 2010 2:30 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Justin Blanchard |
Wed Feb 03, 2010 11:36 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Michel Van den Bergh |
Thu Feb 04, 2010 8:16 am |
Re: New Year's resolution: a chess engine written in BASH sc |
Fred Hamilton |
Thu Feb 04, 2010 3:33 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Edmund Moshammer |
Thu Feb 04, 2010 3:59 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Fred Hamilton |
Thu Feb 04, 2010 4:04 pm |
Re: New Year's resolution: a chess engine written in BASH sc |
Edmund Moshammer |
Thu Feb 04, 2010 4:26 pm |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|