Jump to content

more about fancy bot redraws


kuroi neko

Recommended Posts

Ok, I tried the alied '44 bombing campaign and I must say the usual AI redraw bug made a complete mess out of it.

Basically it's a picnic ride on the German side, and a tedious, frustrating ordeal on the Allied side. The main reason: the obvious AI redraw bug, which turns the AI fighters into mindless player and bomber killers. Especially the wingmen who can redraw a preposterous number of cards.

As it is now, the side owning bombers is at a huge disadvantage, and it shows immediately. I managed to wipe the floor with the Allied (something like 110 points to 55), but as Allied I simply cant save a couple of rested B17 escorted by my best Thunderbolt pilots agains a pair of fatigued fw190.

A striking example : I found a really brillant fw190 wingie who started a turn with no less than 8 (eight) cards in hand.

Here are the characteristics of the German "ace"

Name : Norbert Haff

Skills :

Natural pilot

Teamwork

Check six

Anticipation

Distract wingman

Sweep tail

Draw an extra card x2

Target pilot x2

fatigued (one less structure point)

Altitude : medium

attacking a B17

As far as I understand, the fw190 wingman should draw 4 attack cards at medium.

The teamwork skill should add one for a total of 5. All the other skills have no influence on the number of wingman attack cards, as far as I understood.

Assuming the AI drew a card at start of turn we could rise to 6.

Now as it appears, the wingie, not satisfied with this meager hand, drew yet another card after playing 2 or 3, for a grand total of 9 (nine) cards in one single turn.

And of course he had already drawn another card at turn one, which means he managed to summon 3 cards out of thin air.

At any rate, it is quite infuriating to see the bots draw as much cards as they want in a single turn, while the human players (and the bombers it seem) are limited to one extra draw in that situation. Or if they aren't I would like to understand how the interface allows to draw more than one extra card in a reaction phase!

I reckon this problem was not so apparent in the demo due to the modest plane performances, but experiencing the difference between drawing for instance 6 and 9 cards in one turn is really an eye-opener.

For very rare cards, the probability is roughly a linear function of the number of draws. For instance, the probability to get an IMS2:D from a complete deck of 76 crads in 6 draws is about 7.9%, and it rises to 11.8% with 9 draws.

Now the probability to get at least an IMS2:D or OTS3:4 will rise from 15.3% to 22.3% (computations done by the book, using the statistical "hypergeometrical law" as we called it in my French preppie days smile.gif ).

Which means the redraw bug is increasing the probability of appearance of a "sudden death" card by about 50%. Now the actual "sudden death" probability is also increased by the fact that the redraw time is chosen to optimize the efficiency of the killer cards (the bots will select the oponent with the smallest hand). It means you practically stand no chance once the wingie has drawn the killer card if it is accompanied by a random choice of other helper cards that seriously outnumber the cards in your own hand. A player wingie will NEVER get 9 cards in a reaction phase, more like 3 or 4 for comparable planes. The difference in numbers will practically make the killer cards unstoppable. Where there is still a chance of defending against 6 cards with 4 cards, there is a huge lot less against 9.

I would say a 9 cards hand against a wingie defending with 4 random cards has about 15% chance of ending in sudden death by IMS2:D or 4 points of damage from an OTS3:4. Not counting the possible damage with conventional IMS cards or weaker OTS. I've not done the exact maths but it should rise the sudden death probabilities to above 20-30%. Deadlier than Russian roulette smile.gif . Similar considerations apply to the bombers, but I have no idea of the bomber reaction cards system, so...

And also, the ability for the bots to draw multiple cards in a single phase as they see fit is very seriously tweaking the probabilities: drawing a new card each time a dangerous card is played is of course a much more optimal use of extra draws than what the player is allowed to do.

This bug is a complete fun killer. I may understand the AI planes are biased in dogfight mode to prevent people from gaining easy experience, but in campaign games at least, I would like to see bots that abide by the rules!

Ah, and besides I saw a campaign game with no less than 3 IMS2:D and 3 OTS3:4 in 3 turns. The cards drawing code IS buggy, either in the principle or implementation, and after playing around with the full version I have lost any remaining doubts about it.

I suggest again to add a statistical measurement system on the server, to get the real repartition of cards and count the actual number of redraws. This should be a great debugging helper and also a non-regression tool for future evolutions.

Link to comment
Share on other sites

I think I see the misunderstanding.

(Page 6 of the manual) A wingman gets cards equal to its Attack PLUS Defense -1 when shooting at a Light or Medium bomber. Wingmen get Attack PLUS Defense cards when attacking a Heavy bomber.

On top of these cards they get cards for skills and possibly one Extra Card draw for that skill.

At a glance, the Fw-190 Wingman looks to be drawing the proper number of cards against a Heavy Bomber.

Link to comment
Share on other sites

Ah well my bad, sorry redface.gif . Proper number of cards indeed: 4(attack)+1(teamwork)+2(defense)+1(check six).

Medium alt for b17s is pretty rare, and against such killer German planes it is indeed a suicide run. Too bad I never had the fortresses flying that low when I was playing for the other side smile.gif .

BUT I still cant understand:

- how the system is supposed to produce such a number of IMS2:D and OTS3:4 in a row (possibly warping probabilities, which may explain the frustrating results - losing a wingman and a bomber to IMS2:D while countering a third one, plus an ace wasted countering an OTS3:4 and another bomber crippled by two OTS3:4, all in 3 turns, is a bit annoying)

- why the bots are allowed to draw more than one card in a reaction phase (both in attack and defence, just try to attack a wingman and see him add a card to his hand each time you play a manoeuver or burst against him)

- why the number of bot's extra cards often exceeds what is stated on the pre-flight screen (pretty hard to pinpoint this one, hence the idea of a systematic measurement on the server).

Link to comment
Share on other sites

The issue with bots drawing extra cards is strange. I've been watching for this during the last few days and have not seen it.

I have been keeping track of when they draw cards, and so far, I have only seen them draw one card per pilot turn, and not exceed their total extra card draws.

I'll keep watching.

Maybe we can play a few 2v2 games together with 2 bots and see if it happens?

Link to comment
Share on other sites

I am currently testing a version of the game that should correct any problems around drawing cards from the deck (e.g., you should no longer see the IMS 2: Destroyed show up twice in a row, etc.) Hopefully it will be ready to put out on the server early next week.

Link to comment
Share on other sites

I've now played about 20 games with both low and high level pilots against bots in 2v2 games.

I have tracked all the extra card draws used and have not seen any problems.

The only idea I can come up with is that the use of other skills is being seen as the Extra Card Draw skill.

For example:

If a w/m has Leader Advice, his Leader gets a card at the start of his turn.

If a Leader has Aggressive, he gets a card when he becomes Advantaged/Tailing, or if he starts his turn that way.

If a Leader has Quick Reflexes he gets a card when he is selected as the target of an enemy aircraft.

When pilots have a lot of skills it is possible for them to draw several cards per turn without using Extra Card Draw.

Link to comment
Share on other sites

Ok, I did quite an extensive testing myself and could not pinpoint a fault. Especially the "wingman draws a new card each time I play one against him" case.

Either this problem sorted itself out in new software releases or it was just a figment of my initial frustration against the über bots :D .

After all my ranting, I am ashamed to admit I may have been fooled by the amazing amount of skills from the über bots at the demo time, combined with the "exotic" card deck implementation redface.gif .

However, allowing players to know the exact reason of each AI redraw would put an end to all suspicions. A small log area in the game window could be added, with inforamtions like "pilot ppp draws xxx cards at start of turn", "pilot ppp uses skill sss to draw a card", "pilot ppp discards xxx cards to follow altitude change", "leader lll drops a random card due to wingman www skill", etc.

Also, a detailed log file of the last mission could be created locally to allow players to get rid of any doubt about what actually happened during the game.

As an added benefit, this file could also be used as mission report (instead of the current screenshot required for tournament games).

Link to comment
Share on other sites

Dan and I were kicking around an idea that might address a couple of issues, and I'd be interested in hearing player's thoughts on it.

Suppose that there was a set of icons that appeared near the pilot's name (above or below the black bar that displays altitude). The icons would represent the pilot's skills. If you hovered your mouse over the icon, it would display a "tooltip" name for the skill (e.g., "Sweep Tail", etc.), and maybe if you clicked on the icon it would display a full description of the skill.

When a skill is actively being used, such as when a "Draw Extra Card" is used, the icon would flash or something.

It seems like this might address a couple of issues we have heard coming from players:

1. It's too hard to find out what skills your opponents (and allies) possess. You can go back to look at the "Preview" window, but that takes you away from the game.

2. It's hard to determine when a skill is being used against you.

Of course, there are some potential problems with using icons as well:

1. It can be difficult to get a set of "meaningful" icons. It's hard to convey something as complicated as a skill in a 16x16 pixel area.

2. There could be some screen real estate problems when pilots have a lot of skills.

3. The client doesn't always know WHY something happened. For example, suppose your wingman has the "Leader Advice" skill. At the start of this leader's turn, the server does a check and sees that it needs to deal the leader an extra card. The server draws the card, and sends out a message to the client that tells it to add the card to the leader's hand. The server knows why the card was drawn, but all the client knows is that it was told to add a card. It doesn't know why. Could we add that information? Yes, but it will take a bit more effort to do.

Link to comment
Share on other sites

Well this seems a very good way of displaying all the informations. Reminds me a bit of the icons in "over the Reich" and "achtung! Spitfire". I always liked the simple and readable design of the squadron roster in these games.

An intermediate possibility would be simply to create this log file I talked about, very easy to implement in comparison with new graphic stuff (although some modification to the protocol would still be needed, but that will have to be done either ways).

It may be enough to see what really happened and get a link to what is recorded on the server (a simple timestamp or game identifier should do the trick).

Link to comment
Share on other sites

I am so for the added icons. I do really check quite often what a bot has in skills and sometimes I forget and have to go look. This would be wonderful IMO.

I would very much like to see when a bot or player draws a card. Sometimes they have 0 cards showing but play cards and the zero doesnt change.

Sometimes I think we gamers ask for so much, but I think I speak for all the rest of us when I say thanks for listening to us even after the game is finished. If only the Army worked like this....

Thanks

-Ray

Link to comment
Share on other sites

Just a heads up that the server was updated this morning with the revised card deck logic (no download is necessary as this is all server-side stuff). This version should make the card deck behave more like people expect, ie, when the deck is reshuffled, cards that are currently in players hands are taken into account.

Please let me know if you experience any problems with the update, or if you think there is anything strange about the way cards are dealt.

Link to comment
Share on other sites

Well, I stuck with the random generator that .NET provides. It automatically seeds the generator based on the machine's tick count, so it should provide a good distribution. I think that the problems had more to do with the fact that the cards in player's hands were not being factored into the reshuffle process, and there seems to have been some threading issues where a card could be drawn and before it was marked as unavailable, another thread might pull the same card.

Hopefully the new system will resolve both of these problems without introducing any new ones.

Link to comment
Share on other sites

lol ok, that part about random generator choice was just a private joke smile.gif

About threading issues, I suspect there is another quirk in the card drawing interface.

In the discard phase, if you click the "discard" or "next turn" button just at the time the timer runs out, you may end up with all your cards gone except the ones you just redrew.

It happened to me only once (during a campaign turn with Horatius).

I had a 5 cards hand and 2 power points, discarded one, then typed something in the chat and forgot about the timer, so seeing that I was runing out of time I clicked in a hurry, but just a second too late.

If I remember correctly, what happened was that the next confirmation screen did show up very briefly, showing only the 2 new cards, then my turn ended.

At the start of the next turn for this element, I saw I had only the two new cards in my hand, all the 4 old ones were gone for good.

It looks like the timeout event fell just in the middle of the redraw procedure and messed up the cards list.

Just an educated guess, but it could come from the timeout being handled in some kind of callback or service thread which would access the global player's card list (by calling the "next phase" activation or something like that) already being modified by the main user interface thread. To avoid that, I suppose some shared data access protection with the user interface thread could be added (mutex or equivalent), or the event could be re-routed as a message to be handled directly by the thread already in charge of the rest of the user commands.

Link to comment
Share on other sites

No joke!

My eyeballs went dry a few times while reading and locked in place until I could drop in some water. (All in good fun.) smile.gif

Honestly, it's a great compliment when someone cares enough about a game to think of, and type in, long posts aimed at improving the game. It means they care, and there is no higher compliment. I really appreciate it.

Link to comment
Share on other sites

Hehe. Would have been even more funny if you had put a medal by his name on the board. smile.gif

But seriously, you should hire him in some capacity. He really knows his stuff about the subject matter too, not just what will be good ideas.

And if it doesnt work out, you can always get the man to type something up. He does show much talent in that area. :D

-Ray

Link to comment
Share on other sites

×
×
  • Create New...