|
I'm trying to write an AI game search tree with a depth-first search in java. I already have a recursive version that works, but this seems like it would be a lot faster. The problem is it needs to iterate somehow so that I can stop it at a maximum depth, and so that I can do min/max at certain levels. I tried doing this:code:
|
# ¿ Mar 28, 2008 17:02 |
|
|
# ¿ Apr 29, 2024 13:39 |
|
Ah thanks adding a depth variable to the State class worked. Now each state starts with depth=0, then the transition() method adds one to it each time.csammis posted:It doesn't look like you're ever popping from leaves, is that correct? Presa Canario fucked around with this message at 19:59 on Mar 28, 2008 |
# ¿ Mar 28, 2008 19:55 |