09-22-2021, 02:04 AM

Hi, I had a chance to try it. It does surprisingly well, but for my games, far from understandable.

For this particular game:

A ludeme for "not crossing a connection <defined by a knight's move> <between friendly "Balls"> " would help some. Being able to define the "I" pieces as "Connections between friendly pieces", and/or having the description generator realize that they do not affect the rules of play logically (in this game)

and/or allowing named connection types to be a kind of dynamic container name for pairs of sites with a logical condition, so that I could define "knight connections" with some logic related to the contents and distance and direction between any two sites, and then refer to those matching connections in the game script by the defined name. eg to define groups, enclosure, blocked crossings and so on related to the set of them

or allowing connections (if not part of the play rules) to be part of the meta data, for example adding a dynamic ludeme to graphics:

(show connection from:... to:... if:(expression based on both (from) and (to) that causes the connection to be shown if true) ... image:... fillColour:.... edgeColour:... rotation:... scale:...)

For games in general:

I would also like to suggest that you add an option to (define) to include the text to use to replace the details of the define in the generated rules.

If the text does not exist, you generate in the way you have done. If it does exist, you substitute that wording for the detailed text, and later add a statement starting with that define wording to state what it means and put the details there. If you see that script writers invent descriptions that are obvious in meaning, they could omit the description in the define, or you could decide a new ludeme is needed for it.

Here is a generated description of how player 2 should move in the game I was testing:

Move: Add Ball of the moving player to the set of empty cells then if can move leap a piece to Player at to is the mover, not Ball of the moving player is in the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and 2 is greater than the number of null in the region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false, for all values in the results of applying site 0 of region the difference between all Edges that are incident of Cell site 0 of region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and the difference between all Edges that are incident of Cell site 0 of region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and all Edges that are incident of Cell site 1 of region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false from the to location of the last move to the to sites of leap a piece to Player at to is the mover, not Ball of the moving player is in the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and 2 is greater than the number of null in the region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false add I of the moving player then set the state of the Edge state variable "ToEdge" to add the following values: [1,if site 0 of region all Cells that are incident of Edge state variable "ToEdge" is equal to the Cell 1 steps ahead of site 1 of region all Cells that are incident of Edge state variable "ToEdge" in the direction east or site 0 of region all Cells that are incident of Edge state variable "ToEdge" is equal to the Cell 1 steps ahead of site 1 of region all Cells that are incident of Edge state variable "ToEdge" in the direction west then 0 otherwise 2] and if can move leap a piece to Player at to is the mover, not Ball of the moving player is in the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and 2 is greater than the number of null in the region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false, for all values in the results of applying site 0 of region the difference between all Edges that are incident of Cell site 0 of region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and the difference between all Edges that are incident of Cell site 0 of region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and all Edges that are incident of Cell site 1 of region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false from the to location of the last move to the to sites of leap a piece to Player at to is the mover, not Ball of the moving player is in the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and 2 is greater than the number of null in the region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false add I of the moving player then set the state of the Edge state variable "ToEdge" to add the following values: [2,if site 0 of region all Cells that are incident of Edge state variable "ToEdge" is equal to the Cell 1 steps ahead of site 1 of region all Cells that are incident of Edge state variable "ToEdge" in the direction east or site 0 of region all Cells that are incident of Edge state variable "ToEdge" is equal to the Cell 1 steps ahead of site 1 of region all Cells that are incident of Edge state variable "ToEdge" in the direction west then 0 otherwise 2] and Each turn, where the site is within the number of sites within 1 spaces of the to location of the last move includeOrigin: false, Player at current site is the mover, remove pieces at site 0 of region the difference between all Edges that are incident of Cell current site and the difference between all Edges that are incident of Cell current site and all Edges that are incident of Cell thefor the to location of the last move and Each turn, where the site is within all Edges that are incident of Cell the to location of the last move, current moving player is equal to Player at current site, remove pieces at current site and moves with priority: for all values in if 0 is equal to the number of sites in the intersection of Marked: the union of the corner sites of the board and the centre sites of the board for Neutral and the set of empty cells or 1000000000 is equal to the number of Adjacent step orthogonal from Cell current value to the intersection of Marked: the union of the corner sites of the board and the centre sites of the board for Neutral and the set of empty cells, trigger Enmeshed for Player the next player and set the state of the Cell current value to 1, if 0 is equal to the number of sites in the intersection of Marked: the union of the corner sites of the board and the centre sites of the board for Neutral and the set of empty cells or 1000000000 is equal to the number of Adjacent step orthogonal from Cell the to location of the last move to the intersection of Marked: the union of the corner sites of the board and the centre sites of the board for Neutral and the set of empty cells, trigger Enmeshed for Player the moving player and set the state of the Cell the to location of the last move to 1 and for all values in if 0 is equal to the number of sites in the intersection of Marked: the union of the corner sites of the board and the centre sites of the board for Neutral and the set of empty cells or 1000000000 is equal to the number of Adjacent step orthogonal from Cell current value to the intersection of Marked: the union of the corner sites of the board and the centre sites of the board for Neutral and the set of empty cells, set the state of the Cell current value to 1

For this particular game:

A ludeme for "not crossing a connection <defined by a knight's move> <between friendly "Balls"> " would help some. Being able to define the "I" pieces as "Connections between friendly pieces", and/or having the description generator realize that they do not affect the rules of play logically (in this game)

and/or allowing named connection types to be a kind of dynamic container name for pairs of sites with a logical condition, so that I could define "knight connections" with some logic related to the contents and distance and direction between any two sites, and then refer to those matching connections in the game script by the defined name. eg to define groups, enclosure, blocked crossings and so on related to the set of them

or allowing connections (if not part of the play rules) to be part of the meta data, for example adding a dynamic ludeme to graphics:

(show connection from:... to:... if:(expression based on both (from) and (to) that causes the connection to be shown if true) ... image:... fillColour:.... edgeColour:... rotation:... scale:...)

For games in general:

I would also like to suggest that you add an option to (define) to include the text to use to replace the details of the define in the generated rules.

If the text does not exist, you generate in the way you have done. If it does exist, you substitute that wording for the detailed text, and later add a statement starting with that define wording to state what it means and put the details there. If you see that script writers invent descriptions that are obvious in meaning, they could omit the description in the define, or you could decide a new ludeme is needed for it.

Here is a generated description of how player 2 should move in the game I was testing:

Move: Add Ball of the moving player to the set of empty cells then if can move leap a piece to Player at to is the mover, not Ball of the moving player is in the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and 2 is greater than the number of null in the region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false, for all values in the results of applying site 0 of region the difference between all Edges that are incident of Cell site 0 of region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and the difference between all Edges that are incident of Cell site 0 of region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and all Edges that are incident of Cell site 1 of region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false from the to location of the last move to the to sites of leap a piece to Player at to is the mover, not Ball of the moving player is in the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and 2 is greater than the number of null in the region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false add I of the moving player then set the state of the Edge state variable "ToEdge" to add the following values: [1,if site 0 of region all Cells that are incident of Edge state variable "ToEdge" is equal to the Cell 1 steps ahead of site 1 of region all Cells that are incident of Edge state variable "ToEdge" in the direction east or site 0 of region all Cells that are incident of Edge state variable "ToEdge" is equal to the Cell 1 steps ahead of site 1 of region all Cells that are incident of Edge state variable "ToEdge" in the direction west then 0 otherwise 2] and if can move leap a piece to Player at to is the mover, not Ball of the moving player is in the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and 2 is greater than the number of null in the region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false, for all values in the results of applying site 0 of region the difference between all Edges that are incident of Cell site 0 of region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and the difference between all Edges that are incident of Cell site 0 of region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and all Edges that are incident of Cell site 1 of region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false from the to location of the last move to the to sites of leap a piece to Player at to is the mover, not Ball of the moving player is in the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false and 2 is greater than the number of null in the region the intersection of the number of sites within 1 spaces of to includeOrigin: false and the number of sites within 1 spaces of the to location of the last move includeOrigin: false add I of the moving player then set the state of the Edge state variable "ToEdge" to add the following values: [2,if site 0 of region all Cells that are incident of Edge state variable "ToEdge" is equal to the Cell 1 steps ahead of site 1 of region all Cells that are incident of Edge state variable "ToEdge" in the direction east or site 0 of region all Cells that are incident of Edge state variable "ToEdge" is equal to the Cell 1 steps ahead of site 1 of region all Cells that are incident of Edge state variable "ToEdge" in the direction west then 0 otherwise 2] and Each turn, where the site is within the number of sites within 1 spaces of the to location of the last move includeOrigin: false, Player at current site is the mover, remove pieces at site 0 of region the difference between all Edges that are incident of Cell current site and the difference between all Edges that are incident of Cell current site and all Edges that are incident of Cell thefor the to location of the last move and Each turn, where the site is within all Edges that are incident of Cell the to location of the last move, current moving player is equal to Player at current site, remove pieces at current site and moves with priority: for all values in if 0 is equal to the number of sites in the intersection of Marked: the union of the corner sites of the board and the centre sites of the board for Neutral and the set of empty cells or 1000000000 is equal to the number of Adjacent step orthogonal from Cell current value to the intersection of Marked: the union of the corner sites of the board and the centre sites of the board for Neutral and the set of empty cells, trigger Enmeshed for Player the next player and set the state of the Cell current value to 1, if 0 is equal to the number of sites in the intersection of Marked: the union of the corner sites of the board and the centre sites of the board for Neutral and the set of empty cells or 1000000000 is equal to the number of Adjacent step orthogonal from Cell the to location of the last move to the intersection of Marked: the union of the corner sites of the board and the centre sites of the board for Neutral and the set of empty cells, trigger Enmeshed for Player the moving player and set the state of the Cell the to location of the last move to 1 and for all values in if 0 is equal to the number of sites in the intersection of Marked: the union of the corner sites of the board and the centre sites of the board for Neutral and the set of empty cells or 1000000000 is equal to the number of Adjacent step orthogonal from Cell current value to the intersection of Marked: the union of the corner sites of the board and the centre sites of the board for Neutral and the set of empty cells, set the state of the Cell current value to 1