01-16-2021, 07:56 AM
(This post was last modified: 01-16-2021, 07:58 AM by dale walton.)
I am giving up on trying to implement the Throngs move as a single decision step:
From what I see in the Full moves and warnings of some of my compiled attempts, everything within a single decision move is essentially concurrent, so iterations with consequences are randomly overlapping each other for example with state assignments, and the intermediate states cannot be queried (at least not reliably).
For example, I was able to pre-add discs and assign them state values according to the count needed to reach them, except some states were assigned multiple times and adding a comparison to the existing assignment did not prevent overwrites contrary to the condition. Further, when trying to do a second wave of additions to supplement the first additions (all before the desision move selection) the game hung durring play due to inability to draw the components.)
Thus, I am seeing each branch of iterations and of (and) statements, though launching sequentially, but are not constrained to complete in sequence - so you CAN have conditions that are both true and false at the "same" time (not same instant of course, but time is fuzzy here) if the data from each branch is writing to the same registers. This may be your design, or a problem with proper closures - I don't presume to know as I am not a JS programmer, but come from a procedural background.
In any case, let's call it the design. Then I don't see any workarounds for enforced intermediate state updates without using decision moves, and the system also complains if a "decision move" consist of moves without a decision (by design), so the moves cannot even be automated across several "decision" Moves. There seems to be no way I can reliably "play out" the possible combinations, and then base a selection upon them.
Maybe there is something in the deduction puzzle ludemes, but the math is over my head, and the documentation says essentially "don't even think about using it in games" Is there a way this could somehow be used to automate a series of move possibilities to prepare for a selection? i.e. create a "result" of all sites reachable within a certain number of moves including alternatives and constraints.
- Fortunately I can implement this as a series of decision moves, without being too tedious for Human players.
So I will do it that way.
But this will leave the AI with way too many possible redundant moves to process efficiently. - and possibly several AI moves per turn to wait for.
The good side, is all this mental exercise is helping me to understand how to write scripts better and faster.
Sorry for venting my frustrations here, but I needed to get that out. I don't know if there is anything you can do to help.
From what I see in the Full moves and warnings of some of my compiled attempts, everything within a single decision move is essentially concurrent, so iterations with consequences are randomly overlapping each other for example with state assignments, and the intermediate states cannot be queried (at least not reliably).
For example, I was able to pre-add discs and assign them state values according to the count needed to reach them, except some states were assigned multiple times and adding a comparison to the existing assignment did not prevent overwrites contrary to the condition. Further, when trying to do a second wave of additions to supplement the first additions (all before the desision move selection) the game hung durring play due to inability to draw the components.)
Thus, I am seeing each branch of iterations and of (and) statements, though launching sequentially, but are not constrained to complete in sequence - so you CAN have conditions that are both true and false at the "same" time (not same instant of course, but time is fuzzy here) if the data from each branch is writing to the same registers. This may be your design, or a problem with proper closures - I don't presume to know as I am not a JS programmer, but come from a procedural background.
In any case, let's call it the design. Then I don't see any workarounds for enforced intermediate state updates without using decision moves, and the system also complains if a "decision move" consist of moves without a decision (by design), so the moves cannot even be automated across several "decision" Moves. There seems to be no way I can reliably "play out" the possible combinations, and then base a selection upon them.
Maybe there is something in the deduction puzzle ludemes, but the math is over my head, and the documentation says essentially "don't even think about using it in games" Is there a way this could somehow be used to automate a series of move possibilities to prepare for a selection? i.e. create a "result" of all sites reachable within a certain number of moves including alternatives and constraints.
- Fortunately I can implement this as a series of decision moves, without being too tedious for Human players.
So I will do it that way.
But this will leave the AI with way too many possible redundant moves to process efficiently. - and possibly several AI moves per turn to wait for.
The good side, is all this mental exercise is helping me to understand how to write scripts better and faster.
Sorry for venting my frustrations here, but I needed to get that out. I don't know if there is anything you can do to help.