oyachai / HearthSim

Generic Hearthstone game simulator
MIT License
316 stars 59 forks source link

Long-term bug #119

Open slaymaker1907 opened 9 years ago

slaymaker1907 commented 9 years ago

I've been doing some experiments that require running thousands of simulations over periods of hours and after it's been running for a number of hours, it seems to stop simulating and only throws a bunch of exceptions.

I'm going to go and do some further testing and see if I can replicate the issue with a compiled jar outside of Eclipse as well as with a few different virtual machine arguments over the next few days to see if I can root out the main cause. What is strange is that it's not printing out a full stack trace, just the first line, and the simulation code I'm running is in a try/catch block so I don't think it's printing from my simulation code.

oyachai commented 9 years ago

I've successfully run simulations with up to 50,000 games, though these were with fixed decks with relatively simple cards. As it stands, I know there are issues with some cards (Shadowboxer comes to mind) that have issues, as well as some cards (e.g., Knife Juggler) that tends create so many branches that memory becomes an issue. Shadowboxer has this nasty tendency to get itself in deep recursion, and I'm still trying to understand and fix that.

My primary suspicion is that you are running out of memory due to some combination of cards/actions creating many search branches. I'd be interested to see what you can find through your trials.