How do I make gnuchess really really dumb?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

chessdev
Posts: 31
Joined: Mon Apr 26, 2010 2:47 am

How do I make gnuchess really really dumb?

Post by chessdev »

Hi! I'm trying to get gnuchess to play really badly so it is a fun opponent for kids. Does anyone know which parameters would be best to set? Has anyone done this before?

I imagine we need to put depth at 1 (or zero?). And also set time? What about ponder? What else am I missing?

Thank you!!
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: How do I make gnuchess really really dumb?

Post by Greg Strong »

chessdev wrote:Hi! I'm trying to get gnuchess to play really badly so it is a fun opponent for kids. Does anyone know which parameters would be best to set? Has anyone done this before?

I imagine we need to put depth at 1 (or zero?). And also set time? What about ponder? What else am I missing?

Thank you!!
Ponder would have to be off. Time probably can't be short enough to limit it that way. I think fixed depth of 1 is your best bet. Can't make it "really, really" dumb by just setting options, though. Probably you'd need to change the code to make it randomly overlook moves ...
jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

Re: How do I make gnuchess really really dumb?

Post by jwes »

Have you looked at crafty? It has a skill option (needs to be compiled in) that I have read works pretty well.
chessdev
Posts: 31
Joined: Mon Apr 26, 2010 2:47 am

Re: How do I make gnuchess really really dumb?

Post by chessdev »

the problem is that i need it to run in java... :)
Dirt
Posts: 2851
Joined: Wed Mar 08, 2006 10:01 pm
Location: Irvine, CA, USA

Re: How do I make gnuchess really really dumb?

Post by Dirt »

I'd try setting the material evaluation for pawn, knight, bishop, rook, queen to 1, 2, 2, 2, 3.
chessdev
Posts: 31
Joined: Mon Apr 26, 2010 2:47 am

Re: How do I make gnuchess really really dumb?

Post by chessdev »

how do i set those in gnuchess?
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: How do I make gnuchess really really dumb?

Post by wgarvin »

chessdev wrote:how do i set those in gnuchess?
If you are compiling it yourself (you can get the source from here) then you could open up common.h and scroll down to this bit of code around line 256:

Code: Select all

/* Material values */
#define ValueP   100	
#define ValueN   350
#define ValueB   350
#define ValueR   550
#define ValueQ   1100
#define ValueK   2000
The values appear to be in centi-pawns. Its probably a bad idea to change the value of the pawn itself (ValueP). You might be able to change the other pieces though, maybe like this:

Code: Select all

/* Material values to PLAY BADLY */
#define ValueP   100	
#define ValueN   200
#define ValueB   200
#define ValueR   300
#define ValueQ   300
#define ValueK   2000
And then compile it in the normal fashion. For Windows, maybe you can use a mingw distribution of GCC to compile it; I'm not really sure.
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: How do I make gnuchess really really dumb?

Post by Dann Corbit »

Change the evaluation function so that it does absolutely nothing but wood count.
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: How do I make gnuchess really really dumb?

Post by Greg Strong »

chessdev wrote:the problem is that i need it to run in java... :)
Gnuchess isn't Java...
Dirt
Posts: 2851
Joined: Wed Mar 08, 2006 10:01 pm
Location: Irvine, CA, USA

Re: How do I make gnuchess really really dumb?

Post by Dirt »

Greg Strong wrote:
chessdev wrote:the problem is that i need it to run in java... :)
Gnuchess isn't Java...
I thought that was strange too, but a Google search shows that someone made a port.