Author Topic: Match13  (Read 2593 times)

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Match13
« on: December 17, 2006, 06:00:17 PM »
And it was going so well...  

Sorry Eric but have run into another bug with leagues;

Match 13, Duplo Simpleboticus challenging Una 3.0, stopped at round 106 when I noticed it running rounds lasting several seconds each with the contest results not changing. Showed:

Round 106 of 17
No winner Statistical Draw. Extending contest.
Duplo Simpleboticus 4 - 5
Una 3.0 12 - 5

AskEric.sim attached
« Last Edit: December 17, 2006, 06:02:32 PM by Jez »
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Match13
« Reply #1 on: December 21, 2006, 10:55:25 AM »
Okay, finally found this.  Was hard to debug since a lot of league information isn't stored in sim files.  Sim files just arn't set up to capture league data like rounds and wins and even the fact that we are in league mode.  No plans to change this tomorrow, but at some point, we might want to think about it to help debugging leagues if nothing else.

Anyway, what was happening here was basically a conflict between non-league restart mode and the way league mode does restarts.  If the last of both combatant species in a contest died in the same cycle and that cycle was the one in which the leage code checked the species populations (happens every 10 cycles) then both the league mode code and the restart code would increment the number of contests and restart.  When a contest was in extra rounds, this double increment would push it past the variable "maxrounds" (which is what you saw in the Contests dialog) and screw up subsquent tests for league population checks.  Bascially, the contest would run forever.

To fix this, I changed restart mode to use the same non-recursive restart flag that league mode now does and cleaned up some other checks and interactions between restart mode and league mode, making them essentially independent.  Now one can choose to auto-restart a sim when the population of hetertrofs hits 0 independent of league mode (you don;t need it in league mode) and use league mode without the restart code getting in the way and screwing it up.

Whew.  Fixed in 2.42.9q.
Many beers....

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Match13
« Reply #2 on: December 21, 2006, 11:13:39 AM »
Oh wow, once again you come up trumps!  

Hope tracking this bug down hasn't stpped you enjoying your hols.  

Look forward to q's release and hope that's the end of league bugs.  
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams