Functions in ZoG Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Desired Features for Zillions of Games » Functions in ZoG « Previous Next »

Author Message
Ronald W Brierley (Ronaldwb)
Posted on Monday, June 16, 2003 - 9:57 am:   

I would like the ZoG Language, which contains the Boolean functions 'pieces-remaining' and 'total-piece-count', to be augmented by the Boolean functions 'equal-num', 'lesser-num' and 'greater-num', able to compare numeric values, together with the basic numeric functions 'pieces-remaining-num' and 'total-pieces-num', which can count the number of relevant pieces. It would then be possible to program such tests as (equal-num (pieces-remaining-num) (total-pieces-num)) to find if there is only one player left, without trying to guess how many pieces are still on the board. I am sure other uses would be found which would eliminate otherwise contorted program designs.
Jeff Mallett (Jeffm)
Posted on Friday, June 20, 2003 - 8:16 pm:   

This kind of stuff is one of my top priorities. So, pieces remaining and total piece count are useful values to compare with in move code. The move number is another obvious one. Can we brainstorm on what other functions returning numbers would be useful?
Thanks,
Jeff
Ronald W Brierley (Ronaldwb)
Posted on Thursday, June 26, 2003 - 1:30 pm:   

I tested my multi-player NotChess game for two to four players and found the ZoG AI to be quite sufficient for its purpose. The game has a draw possibility if there are only two players left having one piece each. The AI seems to be able to attempt to reach this position if playing as the player with one piece, or if there are two players with two pieces each, both played by the computer, the AI seems able to look ahead and avoid the potential draw by carefully moving the pieces of each player in turn so that neither player losses a piece. The positions occurring presumably would not be repeated for some large number of moves. In order to create a draw condition for the case of two players with two pieces playing against two pieces, I thought that it could be achieved, perhaps with some consumption of time during play for the checking, if the total number of pieces remaining was checked before each player makes any move. If no change had taken place for a certain number of moves in the game then a draw would be declared to be the result. The above suggests the need for numeric functions to count the total number of pieces remaining and to count the number of moves made. There would need to be Boolean functions to compare values that would be either numerically computed or constants. The draw condition would be the place where the checking took place.
Ronald W Brierley (Ronaldwb)
Posted on Thursday, June 26, 2003 - 1:38 pm:   

Sorry I forgot to mention that the number players remaining would also be very useful.

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: