Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

I'm writing a chess playing program...

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
This topic is archived.
Home » Discuss » The DU Lounge Donate to DU
 
WillyBrandt Donating Member (1000+ posts) Send PM | Profile | Ignore Sat Mar-13-04 03:04 PM
Original message
I'm writing a chess playing program...
just for fun.

Is that a dumb thing to do?

The problem is that while it's going to use alpha-beta pruning, and have a decent (so far as I can make it) static evaluation function, and will be nicely OO--there's going to be no distinction between opening middle and end.

We'll see how long before it can beat me...
Printer Friendly | Permalink |  | Top
htuttle Donating Member (1000+ posts) Send PM | Profile | Ignore Sat Mar-13-04 03:08 PM
Response to Original message
1. No 'book'?
You're just going to use brute force?

I think that GnuChess works that way -- no book of openings, etc..., just brute force. It's fairly bright, too. Not easy to beat.
Printer Friendly | Permalink |  | Top
 
WillyBrandt Donating Member (1000+ posts) Send PM | Profile | Ignore Sat Mar-13-04 03:10 PM
Response to Reply #1
3. Well, I want to focus on making a really good Object
Oriented program structure that could, in theory be adapted to any game of perfect information w/ no randomness... like Checkers or Othello or Connect Four

Adding an opening library would be a pain in the butt.

But if you're right about GnuChess, then maybe this thing can work out.
Printer Friendly | Permalink |  | Top
 
renegade000 Donating Member (1000+ posts) Send PM | Profile | Ignore Sat Mar-13-04 03:09 PM
Response to Original message
2. next year we could have chess AI combat
my senior research proposal pertains to the evolutionary design of chess AIs...we'll see if it works out heh.
Printer Friendly | Permalink |  | Top
 
WillyBrandt Donating Member (1000+ posts) Send PM | Profile | Ignore Sat Mar-13-04 03:10 PM
Response to Reply #2
4. I wrote a Connect Four program once in LISP
And the thing kicked ass... but C4 is a solved game
Printer Friendly | Permalink |  | Top
 
WillyBrandt Donating Member (1000+ posts) Send PM | Profile | Ignore Sat Mar-13-04 03:13 PM
Response to Reply #2
5. I wrote a similar project--a hint
One thing to look into is the more generic question of implementing a MiniMax algorithm.

There was Alpha-Beta pruning, which was a HUGE step that radically increased speed without any change in outcome. (That is for a given search depth the same move would always be found)

Then there's something called MD(f), which is an improved version that essentially keeps memory of what's going on to speed things up yet more.

Printer Friendly | Permalink |  | Top
 
HydroAddict Donating Member (316 posts) Send PM | Profile | Ignore Sat Mar-13-04 03:29 PM
Response to Original message
6. Sounds like fun...
I've spent past couple years writing "brute-force" algorithms to find profitable hyper-short term patterns in the stock-markets using self derived fuzzy logic and neural net principles.

Maybe I should check into some of work done by chess gurus?
Printer Friendly | Permalink |  | Top
 
WillyBrandt Donating Member (1000+ posts) Send PM | Profile | Ignore Sat Mar-13-04 03:35 PM
Response to Reply #6
7. Maybe--but chess guru work tends to focus upon
wading through minimax trees to find the best end state. I'm not sure how it applies to what you're doing.
Printer Friendly | Permalink |  | Top
 
htuttle Donating Member (1000+ posts) Send PM | Profile | Ignore Sat Mar-13-04 04:20 PM
Response to Reply #7
8. I looked at GnuChess with that in mind
Edited on Sat Mar-13-04 04:21 PM by htuttle
I wrote a taxi dispatching system some years ago, and studied GnuChess first to get a general idea of how to go about doing a brute force problem solving algorithm.

One thing I'd say was vastly different: In chess, you have a finite number of pieces, and a finite (albeit large) number of possible end states. In any 'real life' endeavor, you probably have a functionally infinite number of possible end states -- actually, there is no 'end state'. In addition, unlike chess, when dispatching taxicabs and fares, new 'pieces' pop up on the board all the time.

What I decided was that it wasn't much use to work much past the second move, if that. The 'board' was too dynamic to bother working it farther. In addition, each 'piece' would move once (make one decision) per 'turn' (or 'round' in my lingo), instead of one move per 'turn' per side. I settled on going over the entire fleet once, figuring out the best 'first move', then doing it again for the second move, based on the first.

'Moves' (assignments) were weighted based on a number of factors (which I'm still in the process of modifying regularly). The first 'move' (assignment) for each taxi was weighted higher than the second. The best two assignment pair was then chosen for that taxi.

However, what I'd like to do is also compare each taxi's 'pair' of assignments (which my also be two 'null' assignments, ie., no calls to that taxi this round) with every other taxi's pairs, so that if two taxis were up for the same fare, the one with the best 'fitter' (more taxi lingo) would end up with it. Unfortunately, I didn't get this far, since I started to worry that my algorithm was getting kind of ugly. I think my class hierarchy needs a bit of refactoring before I go there.

Since we have some regular sets of fares that ride everyday at the same time, I'd like to treat favorable combinations of these in a manner similar to the 'book' in a chess program, but that will have to wait for refactoring as well.
Printer Friendly | Permalink |  | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Fri Dec 27th 2024, 11:20 AM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » The DU Lounge Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC