3 ms·
It's basically just a depth-first tree traversal with some heuristics to weigh different turns against each other (where a turn is defined as a possible board c
by snickerbockers 2y ago
It's basically just a depth-first tree traversal with some heuristics to weigh different turns against each other (where a turn is defined as a possible board configuration that can be reached from the current configuration).
First you'd have a heuristic that ranks outcomes from turn 3, which would just mean weighing the pieces the computer lost against the pieces the opponent lost. Then you rank each turn-2 node based on how desirable the turn-3 leaf-nodes it leads to are and how likely the opponent is to actually make the moves that lead to it. Then you'd do the same for turn-1 and then pick the move that scored highest.
- Quekid5 2y agoAh, yes... "just". I think you're seriously underestimating the difficulty here.
- snickerbockers 2y agoyeah, maybe. nothing's ever as easy in reality as on paper, but i've always considered my pet projects as long-term endeavors. i can keep working on the same thing for years at a time, and the reason i haven't actually done the chess thing despite often fantasizing about it is that i don't know if i can commit to it without adversely impacting my other pet projects.