Timeline for minimax AI code stuck in a loop
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 16, 2017 at 16:21 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Feb 13, 2017 at 15:02 | answer | added | Joshua Light | timeline score: 1 | |
| Feb 13, 2017 at 14:49 | comment | added | user39111 | @realUser404 okay actually you are right, I was going through a few more example codes/posts and found that the greater the depth the more time it takes and since the dept is set to 7, it was just taking too long to compute the move. I decreased the depth to just 4 and now its proceeding in 2-3 seconds. However, I don't think its working as intended (i.e. the moves suggested seems random). | |
| Feb 13, 2017 at 14:47 | comment | added | realUser404 | Are you sure you are in an infinite loop? in the if (depth > 1) condition, the abMinMax is called with depth - 1 in parameter so the depth is supposed to be decreasing... | |
| Feb 13, 2017 at 14:40 | comment | added | user39111 | @realUser404 actually I found it being stuck in infinite loop and abMinimax function via breakpoints itself. if (depth > 1) is the one calling the function again and again but not decreasing depth anywhere neither is any of the conditions being matched. | |
| Feb 13, 2017 at 14:30 | comment | added | realUser404 | Put a breakpoint in your loop and check what is happening. You will then be at least able to tell if it is really stuck where you think it is. | |
| Feb 13, 2017 at 13:54 | history | asked | user39111 | CC BY-SA 3.0 |