You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(97) |
Oct
(16) |
Nov
|
Dec
|
---|
From: Raimar F. <hawk@B205a.WH8.TU-Dresden.De> - 2000-10-03 14:01:59
|
On Tue, Oct 03, 2000 at 12:54:52PM +0100, Michael Grundel wrote: > Raimar wrote: > > On Mon, Oct 02, 2000 at 11:21:21PM +0200, Ulrich Kuhn wrote: > > > yOn Mon, 2 Oct 2000, Michael Grundel wrote: > > > > > > > > A few littleties: > > > > > For memory's sake and as it is my job :-) I recommend the following patch > > > > > for DataTypeInfoForOneTurn.java: > > > > > > > > > > 27,28c27,28 > > > > > < data = new int[FreecivConstants.MAX_NUM_PLAYERS]; > > > > > < defined = new boolean[FreecivConstants.MAX_NUM_PLAYERS]; > > > > > --- > > > > > > data = new int[4]; > > > > > > defined = new boolean[4]; > > > > > 44a45 > > > > > > if (player >= data.length) grow(Math.max(data.length*2, player)); > > > > ^^^ ^^^^^^^^^^^^^ > > > > We should be careful not to make it larger than FreecivConstants.MAX_NUM_PLAYERS > > > > by doubling. > > > > Could this happen or did I miss something? > > > > As Ulrich mentions below currently this can not happen. However there is no > > harm if data is larger than FreecivConstants.MAX_NUM_PLAYERS. > > I thought the whole point of this was to save space? Would a doubling to 64 > not waste a lot of space? > > > DataTypeInfoForOneTurn doesn't have enough information to check for the > > validity of a given playernumber. However it can test if the value was set > > previously. > > > > > Since MAX_NUM_PLAYERS is 32 this can not happen: 4 -> 8 -> 16 -> 32 > > > So the highest player number will be 31 and that fits in an array with 32 > > > places. > > IMHO this is no valid argument. In fact it only works if MAX_NUM_PLAYERS is > 2^x. I think we should not make such assumptions. It depends on freeciv and > could well be increased in the future (to a non 2^x value). > Lets say it is increased to 40 in freeciv, we would get: 4 -> 8 -> 16 -> 32 > -> 64. > > Since the whole purpose of this is to save some (small amount) of memory, > I believe this should be fixed (if it is done at all). > > A possible solution: > if (player >= data.length) grow(Math.min(Math.max(data.length*2, player), > FreecivConstants.MAX_NUM_PLAYERS); If we grow I would second this line. However I would like to see some measurements of the performance of the grow() method or the arraycopy() call. Raimar -- "Like the ad says, at 300 dpi you can tell she's wearing a swimsuit. At 600 dpi you can tell it's wet. At 1200 dpi you can tell it's painted on. I suppose at 2400 dpi you can tell if the paint is giving her a rash." -- Joshua R. Poulson |
From: Raimar F. <hawk@B205a.WH8.TU-Dresden.De> - 2000-10-03 13:56:57
|
On Tue, Oct 03, 2000 at 08:51:30PM +0800, Wong TM (Huang Deming) wrote: > > Hi! > > After MIA because of mine new job, I found some time. I will try to play my > part. It looks like you are really working *grin* It isn't a computer job judging based on "Bad news is I don't have much time as I am now spending 12hr in front of the monitor 8->" > * Raimar and Ulrich made the following changes: > - > - > - > > * Michael patch merge: "Here is a mini-patch that shows the filename of the > loaded score-file in the titlebar." > > I afraid I didn't go through the code. I see a lot of great changes. Great work > guys. > > I will be honour if Raimar would release CivLog-0.7 to FreeCiv-dev list once it > is ready. You are really short on time?! > Hey, feel free to bump 0.6.2 to 0.6.3 and not 0.6.2mod. Ok. Raimar -- "Reality? That's where the pizza delivery guy comes from!" |
From: Raimar F. <hawk@B205a.WH8.TU-Dresden.De> - 2000-10-03 13:51:31
|
On Tue, Oct 03, 2000 at 08:51:37PM +0800, Wong TM (Huang Deming) wrote: > > > > On Mon, Oct 02, 2000 at 12:54:09AM +0200, Raimar Falke wrote: > > > BTW: Raimar: Your CLTimer may be unprecise on certain platforms. For > > > example in windows 9x Java is not able to be more precise than 50 or 60 ms > > > when invoking System.currentTimeMillis(). So when repeatedly invoking the > > > start and stop methods you may get many 50ms entries where only 100ns is > > > used... > > > > It is more or less a quick hack. It is better than leaving longs all over > > the place. I have no control over the time resolution on certain platforms. > > However IMHO the code for CLTimer is correct. > > I afraid on lousy win98 system, it is(the loading) now around 10x slower. Maybe > we ask Bill Gate to opensource Win98 and we fix it :) Could you post the reports made by the timers. Because of the resolution problem we won't get correct absolute values but maybe we can interpret in a relative way. For this result of more than one run is needed. Something like: for n times do java org.freeciv.civlog.data.SimpleScore scorelogs/superbig.log done Example for two runs on my computer: Timer: 8657ms (count=1) for main load score file loop Timer: 6226ms (count=153126) for reading from file Timer: 1241ms (count=153125) for parsing Timer: 349ms (count=153125) for changing the data structures Timer: 9950ms (count=1) for loading MemoryUsage: 2865720bytes (count=1) for score Timer: 8313ms (count=1) for main load score file loop Timer: 5542ms (count=153126) for reading from file Timer: 1397ms (count=153125) for parsing Timer: 388ms (count=153125) for changing the data structures Timer: 10041ms (count=1) for loading MemoryUsage: 2423568bytes (count=1) for score This shows: most of the time is used for reading the file. only 349/9950=3.5% are used for the new data structures. Raimar -- A life? Cool! Where can I download one? |
From: Wong TM (H. Deming) <loo...@ma...> - 2000-10-03 12:51:31
|
Hi! After MIA because of mine new job, I found some time. I will try to play my part. * Raimar and Ulrich made the following changes: - - - * Michael patch merge: "Here is a mini-patch that shows the filename of the loaded score-file in the titlebar." I afraid I didn't go through the code. I see a lot of great changes. Great work guys. I will be honour if Raimar would release CivLog-0.7 to FreeCiv-dev list once it is ready. Hey, feel free to bump 0.6.2 to 0.6.3 and not 0.6.2mod. -- I Love Linux |
From: Wong TM (H. Deming) <loo...@ma...> - 2000-10-03 12:51:16
|
> -----Original Message----- > From: civ...@li... > [mailto:civ...@li...]On Behalf Of Raimar > Falke > Sent: Tuesday, October 03, 2000 11:37 AM > To: CivLog List > Subject: Re: [Civlog-list] CivLog-0.6.1 > > > On Mon, Oct 02, 2000 at 05:24:15PM +0200, Ulrich Kuhn wrote: > > On Mon, 2 Oct 2000, Raimar Falke wrote: > > > > > On Mon, Oct 02, 2000 at 12:54:09AM +0200, Raimar Falke wrote: > > BTW: Raimar: Your CLTimer may be unprecise on certain platforms. For > > example in windows 9x Java is not able to be more precise than 50 or 60 ms > > when invoking System.currentTimeMillis(). So when repeatedly invoking the > > start and stop methods you may get many 50ms entries where only 100ns is > > used... > > It is more or less a quick hack. It is better than leaving longs all over > the place. I have no control over the time resolution on certain platforms. > However IMHO the code for CLTimer is correct. I afraid on lousy win98 system, it is(the loading) now around 10x slower. Maybe we ask Bill Gate to opensource Win98 and we fix it :) |
From: Michael G. <mic...@gr...> - 2000-10-03 11:17:49
|
Raimar wrote: > On Mon, Oct 02, 2000 at 11:21:21PM +0200, Ulrich Kuhn wrote: > > yOn Mon, 2 Oct 2000, Michael Grundel wrote: > > > > > > A few littleties: > > > > For memory's sake and as it is my job :-) I recommend the following patch > > > > for DataTypeInfoForOneTurn.java: > > > > > > > > 27,28c27,28 > > > > < data = new int[FreecivConstants.MAX_NUM_PLAYERS]; > > > > < defined = new boolean[FreecivConstants.MAX_NUM_PLAYERS]; > > > > --- > > > > > data = new int[4]; > > > > > defined = new boolean[4]; > > > > 44a45 > > > > > if (player >= data.length) grow(Math.max(data.length*2, player)); > > > ^^^ ^^^^^^^^^^^^^ > > > We should be careful not to make it larger than FreecivConstants.MAX_NUM_PLAYERS > > > by doubling. > > > Could this happen or did I miss something? > > As Ulrich mentions below currently this can not happen. However there is no > harm if data is larger than FreecivConstants.MAX_NUM_PLAYERS. I thought the whole point of this was to save space? Would a doubling to 64 not waste a lot of space? > DataTypeInfoForOneTurn doesn't have enough information to check for the > validity of a given playernumber. However it can test if the value was set > previously. > > > Since MAX_NUM_PLAYERS is 32 this can not happen: 4 -> 8 -> 16 -> 32 > > So the highest player number will be 31 and that fits in an array with 32 > > places. IMHO this is no valid argument. In fact it only works if MAX_NUM_PLAYERS is 2^x. I think we should not make such assumptions. It depends on freeciv and could well be increased in the future (to a non 2^x value). Lets say it is increased to 40 in freeciv, we would get: 4 -> 8 -> 16 -> 32 -> 64. Since the whole purpose of this is to save some (small amount) of memory, I believe this should be fixed (if it is done at all). A possible solution: if (player >= data.length) grow(Math.min(Math.max(data.length*2, player), FreecivConstants.MAX_NUM_PLAYERS); Michael -- eMail: mic...@gr... PGP key available on request |
From: Raimar F. <hawk@B205a.WH8.TU-Dresden.De> - 2000-10-03 00:19:53
|
On Mon, Oct 02, 2000 at 11:21:21PM +0200, Ulrich Kuhn wrote: > yOn Mon, 2 Oct 2000, Michael Grundel wrote: > > > > A few littleties: > > > For memory's sake and as it is my job :-) I recommend the following patch > > > for DataTypeInfoForOneTurn.java: > > > > > > 27,28c27,28 > > > < data = new int[FreecivConstants.MAX_NUM_PLAYERS]; > > > < defined = new boolean[FreecivConstants.MAX_NUM_PLAYERS]; > > > --- > > > > data = new int[4]; > > > > defined = new boolean[4]; > > > 44a45 > > > > if (player >= data.length) grow(Math.max(data.length*2, player)); > > ^^^ ^^^^^^^^^^^^^ > > We should be careful not to make it larger than FreecivConstants.MAX_NUM_PLAYERS > > by doubling. > > Could this happen or did I miss something? As Ulrich mentions below currently this can not happen. However there is no harm if data is larger than FreecivConstants.MAX_NUM_PLAYERS. DataTypeInfoForOneTurn doesn't have enough information to check for the validity of a given playernumber. However it can test if the value was set previously. > Since MAX_NUM_PLAYERS is 32 this can not happen: 4 -> 8 -> 16 -> 32 > So the highest player number will be 31 and that fits in an array with 32 > places. Raimar -- The Software is not designed or licensed for use in on-line control equipment in hazardous environments, such as operation of nuclear facilities, aircraft navigation or control, or direct life support machines. -- Java Compiler Compiler Download and License Agreement |
From: Raimar F. <hawk@B205a.WH8.TU-Dresden.De> - 2000-10-03 00:13:27
|
On Mon, Oct 02, 2000 at 06:28:02PM +0100, Michael Grundel wrote: > > On Mon, Oct 02, 2000 at 12:54:09AM +0200, Raimar Falke wrote: > > > > I should stop repling to myself. > > > > > I will do some tests. > > > > Ok the attached version will load the sample score just fine. If there are > > no complains Deming can put a new version together. > > Thanks, it works fine (also tested the big file). > Can we include the small patch to show the filename in the title-bar? The work of merging is up to Deming. Raimar -- email: rf...@in... phone: +49 351 4415773 icq: 54420251 pgp 2: id: 0F9D7955 len: 1024 fingerprint: 7760F933D5478009 4FA0C56F1DC2FB8E "Are you saying that you actually used the Classpath Java AWT classes in addition to the GTK peers and got them to display something? Wow. That's way better than I did and I wrote the code!" -- Aaron M. Renn in the classpath mailing list |
From: Raimar F. <hawk@B205a.WH8.TU-Dresden.De> - 2000-10-03 00:11:34
|
On Mon, Oct 02, 2000 at 05:24:15PM +0200, Ulrich Kuhn wrote: > On Mon, 2 Oct 2000, Raimar Falke wrote: > > > On Mon, Oct 02, 2000 at 12:54:09AM +0200, Raimar Falke wrote: > > > > I should stop repling to myself. > > > > > I will do some tests. > > > > Ok the attached version will load the sample score just fine. If there are > > no complains Deming can put a new version together. > > A few littleties: > For memory's sake and as it is my job :-) I recommend the following patch > for DataTypeInfoForOneTurn.java: I didn't considers because DataTypeInfoForOneTurn is the "innermost" class. There are 500*27 instances of this class. With your proposal there can be 500*27*3=40500 grow operations. I did some rough calculations and came to the conclusion the saved memory isn't worth it. The difference between the classes with 1 (worst case) and 32 players are: 500*27*(32-1)*4=1674000 bytes. > 27,28c27,28 > < data = new int[FreecivConstants.MAX_NUM_PLAYERS]; > < defined = new boolean[FreecivConstants.MAX_NUM_PLAYERS]; > --- > > data = new int[4]; > > defined = new boolean[4]; > 44a45 > > if (player >= data.length) grow(Math.max(data.length*2, player)); > 47a49,58 > > > > private void grow(int newSize) { > > int[] newArray = new int[newSize]; > > System.arraycopy(data, 0, newArray, 0, data.length); > > data = newArray; > > boolean[] newDefined = new boolean[newSize]; > > System.arraycopy(defined, 0, newDefined, 0, defined.length); > > defined = newDefined; > > } Could you please make unified diffs. It is more readable. Just supply "-u" to the command line. > This will save memory consumption by factor 0 to 8 (32 to 4 players in > log). To my surprise I was not able to measure any performance loss. So > System.arraycopy must be extremely fast. It is native. If we use it a lot we should maybe try to measure it. Something like "on a P2-400: arraycopy() can copy a 1000 int array in 1.2ms" > A $@ in the civlog script (for starting CivLog under unix) would enable > the user to start CivLog with a scorelog file as parameter. I don't use it. java -jar CivLog.jar scorelogs/superbig.log works fine. > BTW: Raimar: Your CLTimer may be unprecise on certain platforms. For > example in windows 9x Java is not able to be more precise than 50 or 60 ms > when invoking System.currentTimeMillis(). So when repeatedly invoking the > start and stop methods you may get many 50ms entries where only 100ns is > used... It is more or less a quick hack. It is better than leaving longs all over the place. I have no control over the time resolution on certain platforms. However IMHO the code for CLTimer is correct. Raimar -- "We just typed make..." -- Stephen Lambrigh, Director of Server Product Marketing at Informix, about porting their Database to Linux |
From: Ulrich K. <ku...@un...> - 2000-10-02 21:21:23
|
yOn Mon, 2 Oct 2000, Michael Grundel wrote: > > A few littleties: > > For memory's sake and as it is my job :-) I recommend the following patch > > for DataTypeInfoForOneTurn.java: > > > > 27,28c27,28 > > < data = new int[FreecivConstants.MAX_NUM_PLAYERS]; > > < defined = new boolean[FreecivConstants.MAX_NUM_PLAYERS]; > > --- > > > data = new int[4]; > > > defined = new boolean[4]; > > 44a45 > > > if (player >= data.length) grow(Math.max(data.length*2, player)); > ^^^ ^^^^^^^^^^^^^ > We should be careful not to make it larger than FreecivConstants.MAX_NUM_PLAYERS > by doubling. > Could this happen or did I miss something? Since MAX_NUM_PLAYERS is 32 this can not happen: 4 -> 8 -> 16 -> 32 So the highest player number will be 31 and that fits in an array with 32 places. Ulrich |
From: Michael G. <mic...@gr...> - 2000-10-02 16:44:55
|
> On Mon, Oct 02, 2000 at 12:54:09AM +0200, Raimar Falke wrote: > > I should stop repling to myself. > > > I will do some tests. > > Ok the attached version will load the sample score just fine. If there are > no complains Deming can put a new version together. Thanks, it works fine (also tested the big file). Can we include the small patch to show the filename in the title-bar? Michael -- eMail: mic...@gr... PGP key available on request |
From: Ulrich K. <ku...@un...> - 2000-10-02 15:24:18
|
On Mon, 2 Oct 2000, Raimar Falke wrote: > On Mon, Oct 02, 2000 at 12:54:09AM +0200, Raimar Falke wrote: > > I should stop repling to myself. > > > I will do some tests. > > Ok the attached version will load the sample score just fine. If there are > no complains Deming can put a new version together. A few littleties: For memory's sake and as it is my job :-) I recommend the following patch for DataTypeInfoForOneTurn.java: 27,28c27,28 < data = new int[FreecivConstants.MAX_NUM_PLAYERS]; < defined = new boolean[FreecivConstants.MAX_NUM_PLAYERS]; --- > data = new int[4]; > defined = new boolean[4]; 44a45 > if (player >= data.length) grow(Math.max(data.length*2, player)); 47a49,58 > > private void grow(int newSize) { > int[] newArray = new int[newSize]; > System.arraycopy(data, 0, newArray, 0, data.length); > data = newArray; > boolean[] newDefined = new boolean[newSize]; > System.arraycopy(defined, 0, newDefined, 0, defined.length); > defined = newDefined; > } This will save memory consumption by factor 0 to 8 (32 to 4 players in log). To my surprise I was not able to measure any performance loss. So System.arraycopy must be extremely fast. A $@ in the civlog script (for starting CivLog under unix) would enable the user to start CivLog with a scorelog file as parameter. BTW: Raimar: Your CLTimer may be unprecise on certain platforms. For example in windows 9x Java is not able to be more precise than 50 or 60 ms when invoking System.currentTimeMillis(). So when repeatedly invoking the start and stop methods you may get many 50ms entries where only 100ns is used... So long Ulrich |
From: Raimar F. <hawk@B205a.WH8.TU-Dresden.De> - 2000-10-02 14:15:50
|
On Mon, Oct 02, 2000 at 12:54:09AM +0200, Raimar Falke wrote: I should stop repling to myself. > I will do some tests. Ok the attached version will load the sample score just fine. If there are no complains Deming can put a new version together. Raimar -- "The BeOS takes the best features from the major operating systems. It's got the power and flexibility of Unix, the interface and ease of use of the MacOS, and Minesweeper from Windows." |
From: Raimar F. <hawk@B205a.WH8.TU-Dresden.De> - 2000-10-01 22:54:20
|
On Sun, Oct 01, 2000 at 03:54:13PM +0100, Michael Grundel wrote: > > [ I just noticed that it took the email 2 days to return from sourceforge ] > > What makes you think so? > It appears you sent your reply 2 (+-1) hours after I sent my mail. Yes this mail was ok but the previous: ----------- Received: from lists.sourceforge.net (mail1.sourceforge.net [198.186.203.35]) by irz201.inf.tu-dresden.de (8.8.8/8.8.8) with ESMTP id EAA11226 for <rf...@in...>; Sat, 30 Sep 2000 04:01:00 +0200 Received: from mail1.sourceforge.net (localhost [127.0.0.1]) by lists.sourceforge.net (8.11.1/8.11.1) with ESMTP id e8U1nOW06033; Fri, 29 Sep 2000 18:49:24 -0700 Received: from A315-2b.WH8.TU-Dresden.De (B205a.WH8.TU-Dresden.De [141.30.225.38]) by lists.sourceforge.net (8.9.3/8.9.3) with ESMTP id HAA29555 for <civ...@li...>; Thu, 28 Sep 2000 07:27:56 -0700 ----------- > > On Sat, Sep 30, 2000 at 08:52:54PM +0100, Michael Grundel wrote: > > > Hi! > > > > > > Raimar wrote: > > > > On Mon, Sep 25, 2000 at 05:03:22PM +0200, Raimar Falke wrote: > > > > > On Mon, Sep 25, 2000 at 10:32:33PM +0800, Wong TM (Huang Deming) wrote: > > > > > > > > > > > > Changes: > > > > > > > > > > > > * Ulrich have made a lot of changes to restructure the data structure: > > > > > > - .......wait till I read through the mail. > > > > > > > > > > I think you made the inclusion a bit to fast. The work of Ulrich has made > > > > > aware some questions wrt Score. We now think we how to do it the "right way > > > > > [tm]" so wait for a final version which should come in the next days. > > > > > > > > As promised here is the updated version. It is the result of collaboration > > > > between Ulrich and me. We came to the conclusion that a second loop over all > > > > lines is unnecessary. This also kills the huge "String lines[];" thing. > > > > > > Nice. > > > > > > > A remaining problem are "extra player" (player which aren't declared in the > > > > header). The current solution is to create an array which is big enough to > > > > hold every number of players. Fortunate freeciv is currently limited to 32 > > > > in this respect. > > > > > > > > Another remaining problem is the current implemenation of the relative modus > > > > of PolyLineGroup. It may be possible to let extra players start somewhere in > > > > the graph (see line 380 in Graph) however this doesn't work in the relative > > > > modus. So unknown values are currently set to 0. > > > > > > Another problem is what I reported earlier: the player-numbering is not always > > > continuous. I speculated that this may be a bug in freeciv. It is not. > > > from report.c: > > > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > > for (i = 0; tags[i]; i++) > > > { > > > for (n = 0; n < game.nplayers; n++) > > > { > > > if (is_barbarian (&(game.players[n]))) <---------------- NOTE! > > > { > > > continue; <---------------- NOTE! > > > } > > > switch (i) > > > { > > > case 0: > > > fom = total_player_citizens (&(game.players[n])); > > > break; > > > case 1: > > > fom = game.players[n].score.bnp; > > > break; > > > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > > > > > > Barabarians are not added to the log, so they generate gaps in the player > > > numbering. > > > > > > When I open a score-file that has such a gap, 0.6.1-mod breaks: > > > > Can you give me such a scorefile? > > attached. I will do some tests. > BTW, did you get any email from freeciv-dev over the last days? No. > I have not, the last one I got is from Sebastian Bauer from Thursday. It is also the last email for me. Raimar -- Tank: So what do you need? Besides a miracle. Neo: Guns. Lots of guns. -- From The Matrix |
From: Michael G. <mic...@gr...> - 2000-10-01 14:04:41
|
> [ I just noticed that it took the email 2 days to return from sourceforge ] What makes you think so? It appears you sent your reply 2 (+-1) hours after I sent my mail. from your mail: Date: Sat, 30 Sep 2000 22:02:46 +0200 From: Raimar Falke <hawk@B205a.WH8.TU-Dresden.De> [...] User-Agent: Mutt/1.2.5i In-Reply-To: <LKE...@gr...>; from mic...@gr... on Sat, Sep 30, 2000 at 08:52:54PM +0100 > On Sat, Sep 30, 2000 at 08:52:54PM +0100, Michael Grundel wrote: > > Hi! > > > > Raimar wrote: > > > On Mon, Sep 25, 2000 at 05:03:22PM +0200, Raimar Falke wrote: > > > > On Mon, Sep 25, 2000 at 10:32:33PM +0800, Wong TM (Huang Deming) wrote: > > > > > > > > > > Changes: > > > > > > > > > > * Ulrich have made a lot of changes to restructure the data structure: > > > > > - .......wait till I read through the mail. > > > > > > > > I think you made the inclusion a bit to fast. The work of Ulrich has made > > > > aware some questions wrt Score. We now think we how to do it the "right way > > > > [tm]" so wait for a final version which should come in the next days. > > > > > > As promised here is the updated version. It is the result of collaboration > > > between Ulrich and me. We came to the conclusion that a second loop over all > > > lines is unnecessary. This also kills the huge "String lines[];" thing. > > > > Nice. > > > > > A remaining problem are "extra player" (player which aren't declared in the > > > header). The current solution is to create an array which is big enough to > > > hold every number of players. Fortunate freeciv is currently limited to 32 > > > in this respect. > > > > > > Another remaining problem is the current implemenation of the relative modus > > > of PolyLineGroup. It may be possible to let extra players start somewhere in > > > the graph (see line 380 in Graph) however this doesn't work in the relative > > > modus. So unknown values are currently set to 0. > > > > Another problem is what I reported earlier: the player-numbering is not always > > continuous. I speculated that this may be a bug in freeciv. It is not. > > from report.c: > > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > for (i = 0; tags[i]; i++) > > { > > for (n = 0; n < game.nplayers; n++) > > { > > if (is_barbarian (&(game.players[n]))) <---------------- NOTE! > > { > > continue; <---------------- NOTE! > > } > > switch (i) > > { > > case 0: > > fom = total_player_citizens (&(game.players[n])); > > break; > > case 1: > > fom = game.players[n].score.bnp; > > break; > > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > > > > Barabarians are not added to the log, so they generate gaps in the player > > numbering. > > > > When I open a score-file that has such a gap, 0.6.1-mod breaks: > > Can you give me such a scorefile? attached. > > Exception occurred during event dispatching: > > java.lang.RuntimeException: Incorrect order > > At least we noticed it. > > > at org.freeciv.civlog.data.AbstractScore.addPlayer(AbstractScore.java:87) > > at org.freeciv.civlog.data.SimpleScore.loadScoreFile(SimpleScore.java:246) > > at org.freeciv.civlog.data.SimpleScore.loadScoreFile(SimpleScore.java:55) > > > > I don't know if it still works if you just remove throwing that exception? > > No it wouldn't. You can fix it yourself or send me your score file. > Hopefully it isn't top secret. It is not secret :). It is just large (4.5 MB by now, and the game is not finished yet, currently year 2024, max is 5000). But I found a smaller one. I have attached that (error happens in year 920). When the big game is finished I will also make the log-file available. BTW, did you get any email from freeciv-dev over the last days? I have not, the last one I got is from Sebastian Bauer from Thursday. Michael -- eMail: mic...@gr... PGP key available on request |
From: Raimar F. <hawk@B205a.WH8.TU-Dresden.De> - 2000-10-01 11:47:17
|
On Sat, Sep 30, 2000 at 10:02:46PM +0200, Raimar Falke wrote: > > > Barabarians are not added to the log, so they generate gaps in the player > > numbering. > > > > When I open a score-file that has such a gap, 0.6.1-mod breaks: > > Can you give me such a scorefile? > > No it wouldn't. You can fix it yourself or send me your score file. The attached changes try to solve some of the problems. However it isn't complete. Especially the selection of players (View, MainFrame) will break. You have to apply the diff on top of the last one. Raimar -- "The very concept of PNP is a lovely dream that simply does not translate to reality. The confusion of manually doing stuff is nothing compared to the confusion of computers trying to do stuff and getting it wrong, which they gleefully do with great enthusiasm." -- Jinx Tigr in the SDM |
From: Raimar F. <hawk@B205a.WH8.TU-Dresden.De> - 2000-09-30 20:02:49
|
[ I just noticed that it took the email 2 days to return from sourceforge ] On Sat, Sep 30, 2000 at 08:52:54PM +0100, Michael Grundel wrote: > Hi! > > Raimar wrote: > > On Mon, Sep 25, 2000 at 05:03:22PM +0200, Raimar Falke wrote: > > > On Mon, Sep 25, 2000 at 10:32:33PM +0800, Wong TM (Huang Deming) wrote: > > > > > > > > Changes: > > > > > > > > * Ulrich have made a lot of changes to restructure the data structure: > > > > - .......wait till I read through the mail. > > > > > > I think you made the inclusion a bit to fast. The work of Ulrich has made > > > aware some questions wrt Score. We now think we how to do it the "right way > > > [tm]" so wait for a final version which should come in the next days. > > > > As promised here is the updated version. It is the result of collaboration > > between Ulrich and me. We came to the conclusion that a second loop over all > > lines is unnecessary. This also kills the huge "String lines[];" thing. > > Nice. > > > A remaining problem are "extra player" (player which aren't declared in the > > header). The current solution is to create an array which is big enough to > > hold every number of players. Fortunate freeciv is currently limited to 32 > > in this respect. > > > > Another remaining problem is the current implemenation of the relative modus > > of PolyLineGroup. It may be possible to let extra players start somewhere in > > the graph (see line 380 in Graph) however this doesn't work in the relative > > modus. So unknown values are currently set to 0. > > Another problem is what I reported earlier: the player-numbering is not always > continuous. I speculated that this may be a bug in freeciv. It is not. > from report.c: > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > for (i = 0; tags[i]; i++) > { > for (n = 0; n < game.nplayers; n++) > { > if (is_barbarian (&(game.players[n]))) <---------------- NOTE! > { > continue; <---------------- NOTE! > } > switch (i) > { > case 0: > fom = total_player_citizens (&(game.players[n])); > break; > case 1: > fom = game.players[n].score.bnp; > break; > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > > Barabarians are not added to the log, so they generate gaps in the player > numbering. > > When I open a score-file that has such a gap, 0.6.1-mod breaks: Can you give me such a scorefile? > Exception occurred during event dispatching: > java.lang.RuntimeException: Incorrect order At least we noticed it. > at org.freeciv.civlog.data.AbstractScore.addPlayer(AbstractScore.java:87) > at org.freeciv.civlog.data.SimpleScore.loadScoreFile(SimpleScore.java:246) > at org.freeciv.civlog.data.SimpleScore.loadScoreFile(SimpleScore.java:55) > > I don't know if it still works if you just remove throwing that exception? No it wouldn't. You can fix it yourself or send me your score file. Hopefully it isn't top secret. Raimar who hopes that this email is faster -- A supercomputer is a computer running an endless loop in just a second |
From: Michael G. <mic...@gr...> - 2000-09-30 18:57:40
|
Hi! Raimar wrote: > On Mon, Sep 25, 2000 at 05:03:22PM +0200, Raimar Falke wrote: > > On Mon, Sep 25, 2000 at 10:32:33PM +0800, Wong TM (Huang Deming) wrote: > > > > > > Changes: > > > > > > * Ulrich have made a lot of changes to restructure the data structure: > > > - .......wait till I read through the mail. > > > > I think you made the inclusion a bit to fast. The work of Ulrich has made > > aware some questions wrt Score. We now think we how to do it the "right way > > [tm]" so wait for a final version which should come in the next days. > > As promised here is the updated version. It is the result of collaboration > between Ulrich and me. We came to the conclusion that a second loop over all > lines is unnecessary. This also kills the huge "String lines[];" thing. Nice. > A remaining problem are "extra player" (player which aren't declared in the > header). The current solution is to create an array which is big enough to > hold every number of players. Fortunate freeciv is currently limited to 32 > in this respect. > > Another remaining problem is the current implemenation of the relative modus > of PolyLineGroup. It may be possible to let extra players start somewhere in > the graph (see line 380 in Graph) however this doesn't work in the relative > modus. So unknown values are currently set to 0. Another problem is what I reported earlier: the player-numbering is not always continuous. I speculated that this may be a bug in freeciv. It is not. from report.c: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> for (i = 0; tags[i]; i++) { for (n = 0; n < game.nplayers; n++) { if (is_barbarian (&(game.players[n]))) <---------------- NOTE! { continue; <---------------- NOTE! } switch (i) { case 0: fom = total_player_citizens (&(game.players[n])); break; case 1: fom = game.players[n].score.bnp; break; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Barabarians are not added to the log, so they generate gaps in the player numbering. When I open a score-file that has such a gap, 0.6.1-mod breaks: Exception occurred during event dispatching: java.lang.RuntimeException: Incorrect order at org.freeciv.civlog.data.AbstractScore.addPlayer(AbstractScore.java:87) at org.freeciv.civlog.data.SimpleScore.loadScoreFile(SimpleScore.java:246) at org.freeciv.civlog.data.SimpleScore.loadScoreFile(SimpleScore.java:55) I don't know if it still works if you just remove throwing that exception? Michael -- eMail: mic...@gr... PGP key available on request |
From: Michael G. <mic...@gr...> - 2000-09-28 17:09:04
|
Hi! I just had an all AI-player game finished by a ship reaching Alpha Centauri. However, the Spaceship score stays at level 0 at all time. Di you know if this is a known freeciv problem? Michael -- eMail: mic...@gr... PGP key available on request |
From: Raimar F. <hawk@A315-2b.WH8.TU-Dresden.De> - 2000-09-28 14:27:59
|
On Mon, Sep 25, 2000 at 05:03:22PM +0200, Raimar Falke wrote: > On Mon, Sep 25, 2000 at 10:32:33PM +0800, Wong TM (Huang Deming) wrote: > > > > Changes: > > > > * Ulrich have made a lot of changes to restructure the data structure: > > - .......wait till I read through the mail. > > I think you made the inclusion a bit to fast. The work of Ulrich has made > aware some questions wrt Score. We now think we how to do it the "right way > [tm]" so wait for a final version which should come in the next days. As promised here is the updated version. It is the result of collaboration between Ulrich and me. We came to the conclusion that a second loop over all lines is unnecessary. This also kills the huge "String lines[];" thing. A remaining problem are "extra player" (player which aren't declared in the header). The current solution is to create an array which is big enough to hold every number of players. Fortunate freeciv is currently limited to 32 in this respect. Another remaining problem is the current implemenation of the relative modus of PolyLineGroup. It may be possible to let extra players start somewhere in the graph (see line 380 in Graph) however this doesn't work in the relative modus. So unknown values are currently set to 0. Raimar -- "Life is too short for reboots." |
From: Michael G. <mic...@gr...> - 2000-09-28 11:24:47
|
Hi! Here is a mini-patch that shows the filename of the loaded score-file in the titlebar. It applies to Mainframe.java of version 0.6.1. It does not apply to Mainframe.java from Ulrichs cl.jar (although it really should, because there are no significant differences between the two versions). But it is only one line, so you can add it by hand. Michael -- eMail: mic...@gr... PGP key available on request |
From: Wong TM (H. Deming) <loo...@ma...> - 2000-09-27 14:43:00
|
> -----Original Message----- > Raimar Falke wrote: > > I updated the CVS repository to 0.6.1. I also included the superbig.log from I believe you deserve a big thanks. Thank you, Raimar. > Deming. If you have other score log files which you use please post them > (better post a url). Deming -------- printf("%s\n", -1L > 1LU ? "C sucks" : "as expected"); |
From: Wong TM (H. Deming) <loo...@ma...> - 2000-09-26 06:37:47
|
> -----Original Message----- > Raimar Falke wrote: > On Mon, Sep 25, 2000 at 01:33:02PM +0100, Michael Grundel wrote: > > Raimar wrote: > > > On Mon, Sep 25, 2000 at 12:54:53AM +0100, Michael Grundel wrote: > > > > > On Sun, 24 Sep 2000, Michael Grundel wrote: > > > A greater problem is the number of turns. I see tow possible solutions: > > > - eastimate from the final year the number of turn (this can't be accurate > > > since the mapping changes) > > > > I don't know the formula, but maybe it can be computed based on the first > > year and the last year? From my legacy code: /** see Freeciv/common/game.c - game_next_year() */ int calculateFreeCivTurns () { int turns = 0; /* this updated formula is the one giving me the bigest headache */ /* add a +1 to this formula to be more accurate */ /* this formula calculate the no. of turn between any two freeciv years (>= -4000) */ /* -4000 <= x < -1000, 50 turns */ turns = Math.abs ( (Math.min (Math.max (startYear,-4000), -999) - Math.min (Math.max (endYear, -4000), -999)) / 50); /** -1000 <= x < -1, 25 turns */ turns += Math.abs ( (Math.min (Math.max (startYear,-1000), -1) - Math.min (Math.max (endYear, -1000), -1)) / 25); /** 0 <= x < 1000, 20 turns */ turns += Math.abs ( (Math.min (Math.max (startYear, 0), 999) - Math.min (Math.max (endYear, 0), 999)) / 20); /** 1000 <= x < 1500, 10 turns */ turns += Math.abs ( (Math.min (Math.max (startYear, 1000), 1499) - Math.min (Math.max (endYear, 1000), 1499)) / 10); /** 1500 <= x < 1750, 5 turns */ turns += Math.abs ( (Math.min (Math.max (startYear, 1500), 1749) - Math.min (Math.max (endYear, 1500), 1749)) / 5); /** 1750 <= x < 1900, 2 turns */ turns += Math.abs ( (Math.min (Math.max (startYear, 1750), 1899) - Math.min (Math.max (endYear, 1750), 1899)) / 2); /** 1900 <= x, 1 turn */ turns += Math.abs ( (Math.max (startYear, 1900) - Math.max (endYear, 1900)) / 1); return (turns+1); } > No. From freeciv's common/game.c:game_next_year() > spaceshipparts= 0; > if (game.spacerace) { > for(i=0; parts[i] < B_LAST; i++) { > int t = improvement_types[parts[i]].tech_req; > if(tech_exists(t) && game.global_advances[t]) > spaceshipparts++; > } > } > > if( year >= 1900 || ( spaceshipparts>=3 && year>0 ) ) > year += 1; > else if( year >= 1750 || spaceshipparts>=2 ) > year += 2; > else if( year >= 1500 || spaceshipparts>=1 ) > year += 5; [...] > else > year += 50; > > if (year == 0) > year = 1; > > It depends on the global advance measured in space ship parts. Yes, the above above code didn't take into account of the spaceship parts. I think we had to change freeciv report.c to include add some header. Deming P.S. I am so very happy :) I received a call for a comfirm position as a assistant engineer while I am editing this mail. To my computer: Now I can give a proper brain and faster heart finally 8-)) . Bad news is I don't have much time as I am now spending 12hr in front of the monitor 8-> |
From: Raimar F. <hawk@A315-2b.WH8.TU-Dresden.De> - 2000-09-25 21:18:11
|
I updated the CVS repository to 0.6.1. I also included the superbig.log from Deming. If you have other score log files which you use please post them (better post a url). Raimar -- "Microsoft DNS service terminates abnormally when it recieves a response to a DNS query that was never made. Fix Information: Run your DNS service on a different platform." -- MS service information on bugtraq |
From: Wong TM (H. Deming) <loo...@ma...> - 2000-09-25 16:53:32
|
> -----Original Message----- > From: civ...@li... > [mailto:civ...@li...]On Behalf Of Raimar > Falke > > On Mon, Sep 25, 2000 at 10:32:33PM +0800, Wong TM (Huang Deming) wrote: > > I think you made the inclusion a bit to fast. The work of Ulrich has made > aware some questions wrt Score. We now think we how to do it the "right way > [tm]" so wait for a final version which should come in the next days. Nod. Just mainly to sync. our source dir. after quite a long period. Just take your time. Oh! I can 'rollback' first if you guys don't like it as you maybe currently in the mid of working on the files. Deming |