Advertisement

Chess Algorithm

Started by July 20, 2000 07:04 PM
4 comments, last by Goodlife 24 years, 5 months ago
Okay, here''s a weird one: In my game, your character can die and come to life a limited number of times. After you die the ''last'' time, you can challenge death to a game of chess in order to gain some extra lives. Well, I wrote a somewhat limited chess algorithm. Now, I don''t want it to be very hard, but what I''ve ended up with is way too easy. So what I wanted to know was, does anyone know of a chess library or DLL that has a fairly simple interface? Ideally, I''d just pass the chess ''brain'' the board every time, and allow it to make a move. This is for a very small part of the program, and I don''t want to spend an age writing a chess program. Thanks in advance! -- Goodlife ----------------------------- Those whom the gods would destroy, they first drive mad. --DirectX design team official motto
-- Goodlife-----------------------------Those whom the gods would destroy, they first drive mad.--DirectX design team official motto
that reminded me of that game, aliens, where you had to play reversi with comnputer to solve some of the puzzles

and i''m telling you, it''s really annoying to have amind game at the middle of an action game

- Pouya / FOO!!!

#define PURE_STUPIDITY 128 PROGRAMMERS
Advertisement
1) The gamedev home page has a running chess tutorial right now...maybe you can wait for the last installment?

2) Wouldn''t the chess game take up more play-time than the actual game? It''s an interesting idea. Maybe you can have a couple (say 100) "last move" boards in memory instead. What I mean is, instead of playing a whole game, do some research and find some chess board setups where the next move will make or break the game. If the player makes the wrong move, it''s all over. That might be a little more interesting for the player.
Yeah, I don''t buy anything other than a chess game to play chess...

Stoffel''s idea would be a good one, or you could just have death give you a riddle?

Y''know, stuff like:

"At night they come without being fetched,
And by day they are lost without being stolen."

(stars)

and...

"The beginning of eternity
The end of time and space
The beginning of every end,
And the end of every place."

(the letter ''e'')

etc.

- Goblin
"A woodchuck would chuck as much wood as a woodchuck could if a woodchuck could chuck wood. Deal."
- The Goblin (madgob@aol.com)
Of course, having a riddle, you would probably need to give the guy 10 choices, or something... or drive yourself crazy making a good parser

- Goblin
"A woodchuck would chuck as much wood as a woodchuck could if a woodchuck could chuck wood. Deal."
- The Goblin (madgob@aol.com)
Hehehe,
I had to reply, because everyone seems to think I''m a sort of game-killing idiot to put a chess game in the middle of my game. So, lemme set ya straight:

1) You get 10+ lives on the courtesy of the Gods. If your karma is high enough, you get even more. So, you''d only need to play against Death occasionally. If you did good deeds from square one, you would never need to play chess. This was going to be one of my guardians against PKing.

2) I was going to have the computer play itself until it was 5-6 moves from checkmate on your side (number of moves done for you adjusted by your karma). You only need to play the remaining moves (I realized that putting a whole chess game in would piss people off).

3) Even if you lose, you can be resurrected-- but with some stat loss.

So... now that all the design suggestions are taken care of... does anyone know where I can find an algorithm?

I ask because about a year ago I ran across a DLL that played chess. All you did was pass it an array containing the chessboard, with ''1'' for a pawn, ''2'' for a rook, etc. But now I can''t find it anywhere, so I wondered if anyone had seen it.



-- Goodlife

-----------------------------
Those whom the gods would destroy, they first drive mad.
--DirectX design team official motto
-- Goodlife-----------------------------Those whom the gods would destroy, they first drive mad.--DirectX design team official motto

This topic is closed to new replies.

Advertisement