Chess Question... Pawn to Queen!

Started by
44 comments, last by Moondoggy 20 years, 10 months ago
I think this is an AI specific question, but I will ask it anyway. (feel free to move the post if it is in the wrong forum) I just want to know: if in a game of chess when you reach the other side of the board with a pawn, is there any specific situation or reason why you would not want to turn the pawn into a queen but another piece? I want to know because in my program I don’t want to bother with asking the player what piece they want to change into, (more code!) but instead always change into a queen. Just not sure if this is a good thing to do, I guess it will not be ''perfect'' chess then but I can live with that.... The only thing I can think of is; a situation where changing a pawn into a knight would grant check-mate. (Because the knight has moves that are not accessible by the queen) but wouldn''t this situation be EXTREMLY rare??? Thanks for any help or ideas you can give.
Advertisement
How about a situation where turning it into queen creates an automatic stalemate? In that case, you would turn it into something else.
“[The clergy] believe that any portion of power confided to me, will be exerted in opposition to their schemes. And they believe rightly: for I have sworn upon the altar of God, eternal hostility against every form of tyranny over the mind of man” - Thomas Jefferson
Extremely rare..... but how would you feel, as a person playing the game, if you suddenly came up with this amazing brainstorm on how you could checkmate your opponent, with a little-utilized feature of the game, only to find out that the programmer hadn''t bothered to implement all the rules, leaving you in a suck-ass position?

Implement the choosing.

How appropriate. You fight like a cow.
While playing chess I used traded a pawn for a rook to get a checkmate. because I had a queen and another rook. It blocked him from moving to the side to hide from the queen.
--What are you nutz?I have nothing to say to your unevolved little brain. The more I say gives you more weapons to ask stupid questions.
Sneftel - that is what I am asking, is there some really good reason for not choosing a queen, like afterburn said "he traded a pawn for a rook to get checkmate" surely checkmate could then have been achieved with a queen instead of a rook as she has all the moves a rook has and more.

Ton3k - Ah yes another situation like the knight one I explained, would this not also be VERY VERY rare?

I think I have made my decision anyway, I don’t think I will bother asking for a choice, I have weighed up the alternates and the amount of code I would have to sacrifice would be too much, I will definitely add it to my "added extra" list. That way after I have finished the game I can maybe add it later once I am satisfied with the code.

Cheers for the input.
__________________________
Moondoggy

[edited by - Moondoggy on June 18, 2003 10:50:42 AM]
I agree, implement the choice. It won''t take that long and even though most people would automatically want a queen, if it''s not there it will most likely be missed. Cutting corners is never wise.

--He who laughs last, thinks slowest.
Without order nothing can exist - without chaos nothing can evolve.
"I think I have made my decision anyway, I don’t think I will bother asking for a choice, I have weighed up the alternates and the amount of code I would have to sacrifice would be too much"

That''s only going to make you unhappy in the long run. We know that, and if you search deep within your soul, you really know that too

I don''t see why it would take loads more code to implement anyway. (but then, I''ve never written a chess engine)




My Website: ai-junkie.com My Book: AI Techniques for Game Programming

It can''t take much more time to implement it as a choice for the user.

It may take more time to include it in the heuristics for the AI, but then you can just not allow the computer to promote (because it doesn''t know how)

I suppose you also have to tell the AI that it has to watch out for unorthodox promotions by the player, but that would still be better as a hole in the AI rather than a hole in the game.
There are situations where choosing the queen may be bad. Both have been covered.

A queen may force a stalemate, or a knight may be required to access a specific square. I've seen this in a chess puzzle once, but am not good enough at chess to recognize this in an actual game.

In my own Chess program I force promotions to Queen, mainley because I was burned out by the time I had added all of the bells and whistles to speed up the search.

If the only people who will play your game are your friends and family, force them to queens. They probably won't care, and your search will run faster (less moves to deal with).

Either way, it sounds like you've got an engine running, so congrats!

Will

[edited by - RPGeezus on June 18, 2003 1:56:53 PM]
------------------http://www.nentari.com
Yeah I have got an engine running sort of.

When I tell you it is in OpenGL some of you might understand why I dont want to implement the choice option.
Apart from the fact that I dont know how to implement it,(dialog box, text choice, mouse buttons, etc... ???) I think it would look very ugly to have a dialog box suddenly popup from my OpenGL program and ask the user for some input.

But thanks for your messages.

This topic is closed to new replies.

Advertisement