|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic Page: 1 2 »» |
Last Thread Next Thread ![]() |
| Chess Question... Pawn to Queen! |
|
![]() Moondoggy Member since: 10/23/2002 |
||||
|
|
||||
| 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. |
||||
|
||||
![]() Tron3k Member since: 2/1/2002 From: Toronto, Canada |
||||
|
|
||||
| How about a situation where turning it into queen creates an automatic stalemate? In that case, you would turn it into something else. |
||||
|
||||
![]() Sneftel Moderator - Consoles, PDAs, and Cell Phones Member since: 7/7/2001 From: Philadelphia, PA, United States |
||||
|
|
||||
| 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. |
||||
|
||||
![]() afterburn Member since: 5/30/2000 From: USA |
||||
|
|
||||
| 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. |
||||
|
||||
![]() Moondoggy Member since: 10/23/2002 |
||||
|
|
||||
| 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] |
||||
|
||||
![]() CyberSlag5k GDNet+ Member since: 4/25/2003 From: Blue Ash, OH, United States |
||||
|
|
||||
| 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. |
||||
|
||||
![]() fup Member since: 6/29/2001 |
||||
|
|
||||
| "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 |
||||
|
||||
![]() dagarach Member since: 11/29/2001 From: london, United Kingdom |
||||
|
|
||||
| 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. |
||||
|
||||
![]() RPGeezus Member since: 9/19/2002 From: Ottawa, Canada |
||||
|
|
||||
| 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] |
||||
|
||||
![]() Moondoggy Member since: 10/23/2002 |
||||
|
|
||||
| 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. |
||||
|
||||
![]() Dave Hunt Member since: 12/30/2002 From: Orlando, FL, United States |
||||
|
|
||||
| You don't need fancy dialogs and buttons. Just draw a picture of the available pieces and some text instructing the player to click on which one he wants to promote the pawn to. If you have a working engine, you already have code to handle piece selection, so this should be a piece of cake. |
||||
|
||||
![]() owl Member since: 5/2/2001 From: Buenos Aires, Argentina |
||||
|
|
||||
| There could happend that to win the game in two moves you could need a horse instead of a queen... and logically, you will transform your pawn into a horse. |
||||
|
||||
![]() Moondoggy Member since: 10/23/2002 |
||||
|
|
||||
| Xaxa did you even read any of the other posts?? I now know the two situations where a piece other than the queen may be a desirable transform, but at 'the moment' I have bigger priorities and issues that I need to resolve first. Like I said before I have put it onto my "upgrade list" that I will attend to it after I am happy that I have made a suitable implementation of the whole game. Oh and Dave Hunt, your solution seems the simplest I have come across so far but I still think it would look ugly and messy to just have pictures appear somewhere in the application window. You do know that it is a 3D application with moving camera and all, I can't quite understand where in the window would be a good place to draw these pictures of the pieces that you state! Later. ___________________________________ Moondoggy |
||||
|
||||
![]() owl Member since: 5/2/2001 From: Buenos Aires, Argentina |
||||
|
|
||||
quote: nope |
||||
|
||||
![]() alvaro Member since: 3/7/2002 From: USA |
||||
|
|
||||
| There are several reasons why you should implement the choice. If you don't implement the choice, you don't have the right to call your program a chess program. It's something similar, but not chess. There are examples of positions where you need a knight (relatively frequent), a rook (much less frequent) or even a bishop (I don't know if it has ever happened, but they can be built). Chess problems are cool too, and they often exploit this type of rules. If you don't implement the choice, you can't use your program to study problems. If your program enters a tournament, you would be disqualified if your opponent promotes to a rook and your program doesn't allow it. Of course, my program is mostly text-based and runs under MS-DOS, so I guess we have very different priorities. |
||||
|
||||
![]() Cedric Member since: 3/13/2002 |
||||
|
|
||||
| The BattleChess AI once took a knight to checkmate, and I was impressed. Since it considers multiple choices, it adds branches to the decision tree. Cédric [edited by - cedricl on June 18, 2003 9:37:34 PM] |
||||
|
||||
![]() Dave Hunt Member since: 12/30/2002 From: Orlando, FL, United States |
||||
|
|
||||
| I pictured a frame with maybe a semi-transparent background being drawn over the current view. Then, the instructions and available pieces drawn inside this frame. Once the player chooses the piece, the frame goes away and you're off to the races. |
||||
|
||||
![]() Plasmadog Member since: 12/12/2001 From: Auckland, New Zealand |
||||
|
|
||||
quote: So don't use pictures, use the models that you already have. Show both the queen and the knight models floating side by side above the board. Alternatively, show a queen in place on the promotion square, and swap it for the knight model once a second or so (maybe with a cool morphing effect). Either way, you click on the appropriate model to complete the move. |
||||
|
||||
![]() Moondoggy Member since: 10/23/2002 |
||||
|
|
||||
quote: ohhhhhhh I like that idea... |
||||
|
||||
![]() Nikoko Member since: 5/28/2003 From: France |
||||
|
|
||||
| I participed at many chess tournaments, and like some people answer you, you must let the player make his choice. For example, it is crucial to promote his pawn in knight because if the position is "locked", only a piece which can jump the pawns wall can make troubles to the opponent. Or simply, the player have to make chess to counter the mat and so .... well, you have no choice, let the choice ... |
||||
|
||||
![]() haro Member since: 3/30/2002 |
||||
|
|
||||
| In blitz chess when you are trying to finish off your opponent with 5 seconds left on the clock I would rarely promote to a queen. A rook makes things just as simple and there is virtually no chance of an accidental stale mate. If I am killing an opponent and he refuses to resign I tend to promote 'all' of my remaining pawns to knights and bishops and create picturesque mates. I would never play a program that didn't allow the choice. In fact, I wouldn't even call a program that didn't allow the choice a "chess program". On the other hand I would also never play a chess program that did not allow me to use the typical 2d graphics piece set either. I never understood the point of 'pretty' chess pieces for computer/online play. Underpromotion is as basic a concept as en passant. I presume you've implemented en passant.. right? [edited by - haro on June 21, 2003 10:53:59 AM] |
||||
|
||||
![]() Moondoggy Member since: 10/23/2002 |
||||
|
|
||||
quote: No not yet! |
||||
|
||||
![]() ah_bk88 Member since: 5/19/2003 From: Classified |
||||
|
|
||||
quote: Yeah, I'm voting for this one... That wouldn't take any extra screen space, no popup dialog boxes, etc. I like this idea. |
||||
|
||||
![]() Nikoko Member since: 5/28/2003 From: France |
||||
|
|
||||
| It's a good idea, but if the player must play fast (blitz mode etc.), 1 sec per figure is too long ! I saw a player who has played 6 moves in less than 1 sec ! (I have checked the digits). So in my point of view, I think the better way to promote a pawn is to use keyboard with a simple question (no popup if you dont want): Q for queen, R for rock, etc. (of course K is for knight not for King ;-)) it's a simple way but the most efficient. (sorry for my bad english) |
||||
|
||||
![]() The Pentium Guy Member since: 6/14/2003 From: USA |
||||
|
|
||||
| doing that would confuse the user.. u should have a pop up box, saying, choose left or right. when u hit left, it would to to the next peice |
||||
|
||||
|
Page: 1 2 »» All times are ET (US) ![]() |
Last Thread Next Thread ![]() |
|