n9jlo / bwta

Automatically exported from code.google.com/p/bwta
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Duplicate regions, chokepoints, baselocations #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start a Starcraft game with an AI with bwta
2. Quit the mission without exiting the game 
3. Start the same mission

What is the expected output? What do you see instead?
Regions, Chokepoints, BaseLocations are duplicated.
For example, if the first time there were 10 BaseLocations after restarting 
there are 20.

What version of the product are you using? On what operating system?
Windows 7, bwta version unknown.

Please provide any additional information below.
bwta is used with a .net AI. Here the architecture

BWAPI -> hosting CLR -> AI in .net -> PInvoke  -> bwta.

The ai works great with bwta except when I restart a game without exiting

The problem seem to be a static variable not reinitialized.

Original issue reported on code.google.com by olivier....@gmail.com on 27 Jun 2010 at 1:06

GoogleCodeExporter commented 9 years ago

Original comment by lowerlo...@gmail.com on 28 Jun 2010 at 1:47

GoogleCodeExporter commented 9 years ago
The problem occurs with BWTA from BWAPI 2.6.1. I am not sure this problem 
exists with BWAPI 2.8

Original comment by olivier....@gmail.com on 14 Jul 2010 at 11:48

GoogleCodeExporter commented 9 years ago
It looks like the list of regions, chokepoints, etc. does not get cleared 
between games. Here a capture of when I first analyzed Luna and then analyzed 
Longinus. 

Original comment by bgwe...@gmail.com on 22 Oct 2011 at 12:43

Attachments:

GoogleCodeExporter commented 9 years ago
The solution is to clear() the BWTA_Result::sets in the analyze() function 
rather than the analyze_map() function.

Right now the BWTA_Result data gets cleared only when analyze_map() is called. 
Unfortunately analyze_map() gets called only if it's the first time analyzing 
the map, otherwise load_data(filename) is called. Since load data inserts data 
into BWTA_Result's sets, if the data doesn't get cleared between games we get 
the above problem.

Original comment by wso...@slugmail.ucsc.edu on 25 Oct 2011 at 12:35