AmongVar.impose() initializes xGrounded to the number of X variables already grounded, but then calls super.impose(store), which itself calls AmongVar.queueVariable(), which again increments xGrounded for each singleton variable, resulting in each grounded variable being incorrectly counted twice.
Suggested bug fix: in AmongVar.impose(), initialize xGrounded to 0 (like is already done with yGrounded) instead of to the number of grounded variables.
AmongVar.impose()initializesxGroundedto the number ofXvariables already grounded, but then callssuper.impose(store), which itself callsAmongVar.queueVariable(), which again incrementsxGroundedfor each singleton variable, resulting in each grounded variable being incorrectly counted twice.Suggested bug fix: in
AmongVar.impose(), initializexGroundedto0(like is already done withyGrounded) instead of to the number of grounded variables.