bugLiquid War 6 - Bugs: bug #28030, Bots just dies

 
 

bug #28030: Bots just dies

Submitted by:  Kasper Hviid <kasper_hviid>
Submitted on:  Mon 16 Nov 2009 02:54:39 PM UTC  
 
Category: EngineSeverity: 3 - Normal
Status: FixedPrivacy: Public
Assigned to: Christian Mauduit <ufoot>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sat 17 Jul 2010 07:06:14 AM UTC, comment #13:

Patch is included in the lastest daily snapshot:

http://www.ufoot.org/liquidwar/v6/snapshots/20100717snapshot/liquidwar6-20100717snapshot.tar.gz

(FYI, concerns http://git.savannah.gnu.org/cgit/liquidwar6.git/tree/liquidwar6/src/lib/ker/ker-mapstate.c function lw6ker_map_state_remove_fighters)

Christian Mauduit <ufoot>
Project AdministratorIn charge of this item.
Fri 16 Jul 2010 08:34:34 AM UTC, comment #12:

Yeah, probably release-worthy, also there's been a few fixes on the Mac OS X dmg package, so all in all I might package 0.0.9beta sooner than I initially planned. Releasing does take time but having buggy versions available for download hanging arround for ages is also a bad option.

Christian Mauduit <ufoot>
Project AdministratorIn charge of this item.
Fri 16 Jul 2010 06:19:43 AM UTC, comment #11:

Of course, it is about stealing in an unfair way. Actually, the pseudo-random pick did improve in 0.0.8: sometimes the vicious cycle resolved it self after just giving the three losers -10 points each. You implemented proportional stealing just like already implemented in adding a new team? Thanks. nice. If it works, it could be release-worthy...

Michael Raskin <d79240fd>
Thu 15 Jul 2010 04:01:16 PM UTC, comment #10:

FYI I just wrote a patch (did not make its way to the master repository yet, but it's on its way, will post a comment here when it is done) which changes the way fighters are "stolen" to other teams when respawning someone who died. Just to explain: before, it was a brute-force low IQ algorithm which just pseudo-randomly picked fighters. Normally, on big maps with plenty of pixels, this is a safe bet because statistically, it will pick many fighters in numerous teams and fewer fighters in smaller teams.

So I changed that and now algorithm tries to be "fair" and if there are, say, 100 blue and 50 green and it needs to free 60 fighters it will "steal" 40 to blue and 20 to green.

I believe this can fix your problem, the fact that it happens on small maps (or at least maps with not much people) makes me think it's just the cases where for some reason fighters are stolen in an unfair manner and in our case above, 10 are taken to blue and 50 to green.

I might also add another protection so that not more than one team can "loose" at a time, but I'm not sure it's needed. Wait & see.

Christian.

Christian Mauduit <ufoot>
Project AdministratorIn charge of this item.
Sun 11 Jul 2010 08:35:52 PM UTC, comment #9:

mmm, this is annoying, I admit I rarely play with two bots so I hardly reproduce the bug. I remember a few months ago I looked and looked the code to close this bug, without success. I suspect when network is up this will be easier to track down as "many players" games will be more common.

Christian Mauduit <ufoot>
Project AdministratorIn charge of this item.
Sun 11 Jul 2010 08:15:09 PM UTC, comment #8:

Tried 0.0.8 - bug is still there, random spawn points don't affect it (so it seems to be steal-latest), only get you trampled sometimes (and you cannot do anything about it on some maps)

Michael Raskin <d79240fd>
Sat 26 Dec 2009 04:05:52 PM UTC, comment #7:

Thanks for your feedback Michael, I must admit I didn't take the time to dig into this bug. Not yet ;) Anyways the way fighters are "stolen" to other teams when respawning is a deep subject which will probably need some serious hack in the long term. Nearest, weakest, these could even be options since they really affect the game.

ufoot.

Christian Mauduit <ufoot>
Project AdministratorIn charge of this item.
Sat 26 Dec 2009 01:44:54 PM UTC, comment #6:

Well, I probably was wrong. It seems to take newest items with status change. My fixes still can be applied, and you also can switch to taking least-healthy soldiers. Note that I am too lazy to read the code.

Michael Raskin <d79240fd>
Thu 17 Dec 2009 12:33:49 PM UTC, comment #5:

The reason is perfectly clear.

I kill two bots nearly at once. Respawn of the second one steals the closest fighters (25% of entire population). Too bad they are all from freshly respawned team (because two respawn points are way closer to each other than to the main action).

Of course, the team that was killed on respawn respawns. Guess where it steals all the soldiers. Also guess whether this loop has any reason to stop.

Now you invade. Of course, that means that some of your soldiers get stolen. Now the freshly respawned team isn't destroyed on respawn, just bled dry. Of course you crush it - but now this team just steals your soldiers in needed quatities. Loop is broken.

Solutions:

a) rubber-band logic: you steal closest soldiers from teams who have more than their fair part. Too rubber-band, though

b) proportional stealing: you steal closest soldiers from each team, proportionally to their size. It even encourages not being the first to die in multi-party war.

c) equal stealing. The same, but just steal the same amount. Yes, kill those minorities!

d) stealing immunity. Your soldiers are not stolen until 5 seconds after respawn. Doesn't fix the problem from "tournament point of view", but who cares.

e) b) and d). Unfortunately, leads to a) for big all vs all wars.

f) steal the closest soldiers unless it is more than twice the fair share for this player to give. Closest to the current solution, preserves playability and seems balanced.

Michael Raskin <d79240fd>
Tue 17 Nov 2009 01:09:55 PM UTC, comment #4:

I now realise that different HUD elements changing places is the way LW shows who is in the lead. So that is not relevant here.

Kasper Hviid <kasper_hviid>
Project Member
Tue 17 Nov 2009 11:54:58 AM UTC, comment #3:

Sometimes, the different colored HUD changes place or else they just exchange color. I don't know if this is related.

The killing spree might begin to happen when a lot of teams are killed at almost the same time. Or maybe not, it's just a notion. What is interesting is that the teams re-appear the exact same 5 spots - and when the player attacks them, the killing spree stops.

This video shows what happens:
http://www.kasperhviid.dk/lw6error.avi

Kasper Hviid <kasper_hviid>
Project Member
Tue 17 Nov 2009 10:02:13 AM UTC, comment #2:

That sounds very likely - I have seen it on other levels as well but always (I think) with 4 players and low on fighters.

The parameters are:

<int key="single-army-size" value="14"/>
<int key="total-armies-size" value="40"/>

Kasper Hviid <kasper_hviid>
Project Member
Mon 16 Nov 2009 11:37:21 PM UTC, comment #1:

Huh, interesting, I suspect this is linked to having 4 players and not many of them on the map. Out of curiosity, what are the map parameters single-army-size and total-armies-size?

Christian Mauduit <ufoot>
Project AdministratorIn charge of this item.
Mon 16 Nov 2009 02:54:39 PM UTC, original submission:

LW6 20091112snaptshot:
Windows Vista

The bots will sometimes go on a dying spree, dying an re-appearing several times per second. (check out the numbers in the HUD) It might only be in this level - I'm not sure.

http://img692.imageshack.us/img692/4986/errordw.jpg

Kasper Hviid <kasper_hviid>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by d79240fd (Posted a comment)
  • -unavailable- added by ufoot (Posted a comment)
  • -unavailable- added by kasper_hviid (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 23 Aug 2010 11:29:08 PM UTCufootOpen/ClosedOpen=>Closed
    Mon 23 Aug 2010 11:29:07 PM UTCufootStatusReady For Test=>Fixed
    Sat 17 Jul 2010 07:06:14 AM UTCufootStatusIn Progress=>Ready For Test
    Sun 11 Jul 2010 08:36:50 PM UTCufootStatusNone=>In Progress

    Back to the top


    Powered by Savane 3.1-cleanup1