| Author |
Message |
Karl Scherer (Karl)
| | Posted on Tuesday, December 06, 2005 - 3:05 am: | |
Dear Zillions team, often in game a win-condition is wanted like "whenever a side has run out of moves, the one with the most marbles wins" or "whenever a side has run out of moves, the one with the most marbles and feathers wins" The existing construct (count-condition stalemated) works only in those cases where there is only one piece-type left on the board. But what if the players also own sticks, stones and feathers as tokens, but only one or two piece types count for the win???? My suggested small enlargment of the count-condition would solve these very common goals very elegantly: (count-condition player1 player2 (marble) stalemated) or (count-condition player1 player2 (marble feather) stalemated) I would like to stress that there is NO easy workaround at the moment to achieve this sort of goal, so the problem is quite a fundamental one, not a 'nice to have'. Cheers, Karl |
L. Lynn Smith (Interrupt27)
| | Posted on Tuesday, December 06, 2005 - 10:22 pm: | |
You could create an "end-of-game" button which could only be used if there are no other moves for the player. A null piece on this position would be toggled. And for each of the pieces which count in the end-game, there could be a set of dummy positions that keep track of their number. These positions would be adjusted with the introduction and capture of these pieces. The win-condition could be based upon the presence of the toggled piece on the "end-of-game" button and the difference in the dummy positions using absolute-config and/or relative-config. It may not be an "easy" workaround but it would suffice. |
Karl Scherer (Karl)
| | Posted on Saturday, December 10, 2005 - 4:01 pm: | |
Sorrz to cob´ntradict zou, but this is NOT a workaround, not even a awkward one. "You could create an "end-of-game" button which could only be used if there are no other moves for the player." you said. The problem is that in general it is not possible to check whether there will be anoither move possible. There micht be dozens or hundreds of possibilities to be checked to verify this. This is often not practicle or even possible. This obstacle is exactly the reason why I had big problems to find a workaround! (Even if you find a way to find out whether there is no other move, this complicated coding is counterproductive to an effective AI search, slowing don the search dramatically.) Again, usually there is no way to check whether there is a next move. Just take chess for example. Please show me how you would check whther there is a next move. You would have to incorporate the knowledge of 3-repeat draw etc etc. How do you want to do this??? I am looking forward to your answer. Cheers, Karl |
L. Lynn Smith (Interrupt27)
| | Posted on Tuesday, December 13, 2005 - 8:30 pm: | |
Try using the move-priorities function. Setting the move that allows the 'clicking' of this 'button' within a move-type which is last in the order. All other moves would be located within move-types having higher priority. |
L. Lynn Smith (Interrupt27)
| | Posted on Tuesday, December 13, 2005 - 9:03 pm: | |
Of course, repetiton of position may prove difficult to test. This would be completely dependent upon the individual implementation. You could simply set this condition as a loss for either player. Does Zillions allow the use of a lower priority move if the higher ones would result in the loss of the game? |
Karl Scherer (Karl)
| | Posted on Wednesday, December 14, 2005 - 3:56 am: | |
Using the move priorities WOULD be a good idea if it COULD be used in all cases. However, the move priorities are often used for other purposes already, so you CANNOT ASSUME that you can use use this command! If you don't understand what I mean, let me clarify this with an example: When there are movetypes A,B,C,D,E and I am using the command "move-priorities B C" to only priorities B over C, leaving all other move types unprioritised, then your suggestion fails. The additional movetype you suggest, say E, cannot be fitted in this priority system at all. Consequently, your suggestion is useful only in some, but by far not all cases. As I said, in general there is no workaround to this problem. |
L. Lynn Smith (Interrupt27)
| | Posted on Wednesday, December 14, 2005 - 10:35 am: | |
Per your example: If you have prioritized moves B and C, this means that A, D and E are all set equally low. Since you now note that E should have the lowest, then A and D should be set slighty higher. And because there is no difference in the priority between A and D, they can now be folded into a single move-type. Let's now called it 'A-D'. So, your priority list would now be: B, C, A-D, E. |
Karl Scherer (Karl)
| | Posted on Monday, December 19, 2005 - 6:29 am: | |
Indeed, but.... Thank you very much for highlighting this! I had forgotten that - to quote the reference manual - "Moves without an explicit move-type have the lowest priority. " You are totally right on this. However, a serious programming problem remains: I now remember that my problem with the move priorities was a slightly different one, namely that I use the move types often to structure complicated turn-orders. Therefor I cannot , as you suggested, in general "fold them into a single move-type". Of course, you can argue that there will be a (convoluted) way to use more than one move-type where before many move-type were used, but that would mean throwing away an extremely useful programming tool and messing up and often over-complicating the code quite a bit... The method of using move-types is quite independent of the use of move-priorities and makes a lot of sense without using the priorities. Clearly, when independent tools are used together, they do not always work well together.... Anyhow, thanks for all your suggestions and feedback; it helped me (and maybe a few other authors) to clarify the real problem a bit more. Cheers, Karl |
L. Lynn Smith (Interrupt27)
| | Posted on Monday, December 19, 2005 - 9:54 pm: | |
To continue with your example: --------------- If move-type A and D(which have now been combined in move-type A-D) need remain independent because of some coding reason(i.e. partial move calls) they can be duplicated under their original move-type designations to perform this task and not listed in the move-priority list. --------------- And if you need to call certain moves during particular turns(i.e. First player makes A-type move then B-type move). This can be done by having the desired moves look for particular dummy piece located in a dummy position which is toggled after each move. This would mean rather than calling a move-type from the turn-order, the moves themselves would be conditioned at each turn. Of course the move which would result in the end-game would be un-conditional, so that it would be available at each turn. Or it could be conditional also as the need arises. -------------- I believe with careful consideration you may find that you can accomplish your desired function with the current version of Zillions. Remember it's all ones and zeroes deep down. |
Karl Scherer (Karl)
| | Posted on Thursday, December 22, 2005 - 3:47 pm: | |
Hmm, maybe. I have to think about that. However, giving up all the nice movetype-structures of the turn-order and creating internal code is not what I would call an EASY (!)workaround, which I asked for in the first place. It all does not convince me that the goal command I asked for is not desirable. The movetypes allow to very clearly see the flow of logic and are a great help in the turn-oder. I don't think we should do away with a good tool that helps programming and maintenance a lot. Merry Christmas to you all! |
|