[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]
Single Comment
It looks like I won't need a list. It was timing out on me before because a bug was causing an infinite loop. It was checking for 'not ATTACKEDBYW' instead of 'not fn ATTACKEDBYW', which means it was applying 'not' to the function name instead of to the function itself. This gave the same result every time, leading to an infinite loop. As soon as I fixed the bug, it worked, and it gave me a position with all Pawns defended. But I think I will still optimize this by created a special DEFENDED function that more quickly checks whether a Pawn has a defender. As for comparing the setup to the Gothic Chess setup, I was thinking of calculating the Levenshtein Distance (which is the minimal number of characters you have to replace, insert or delete to transform one string into another) and rejecting any with a distance of 3 or closer. This would be making use of PHP's levenshtein function, which I have passed along to GAME Code. Or should I simply count the number of positions that are the same?