[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: computer-go: unmake move?
I use similar data structures. The trick is that every move stores
unique undo information, which is used by undo. It's still tricky
to get right, and still not blazingly fast.
For example, if move x,y merges two or more groups, store informaion which
says "to undo, split this group around x,y. Write the slow function that
reconstructs the re-split groups, and invoke it only when the undo information
says it is necessary. Similarly for captured groups.
A more severe problem is that in the process of making and unmaking moves,
almost every "fact" your program might develop, and might like to remember
rather than regenerate, is likely to become invalid. The cost of relearning
these facts completely dominates alpha-beta search.