"Total Game Report" Option - For Statistical Purpose



  • On the issue of Luck... Years ago I spoke with Veqyrn, requesting a Hit-Handicap system. Instead, Veqryn developed us just getting a raw dice report, which is fine, better than nothing, and it did dissuade many dice complainers which was the goal; but I still firmly believe in getting a statistic that can show us the game total "luck" handicap.

    So it's time to move to the next level, I have developed a parser for reviewing TripleA game text; from that text it can tell me what nations, got how many hits, vs how many hits they would have had statistically. The results have been awesome - I can now see how my luck handicap is going through the length of a game, and if I've really been lucky, or unlucky, and how my opponent has been. It ends alot of complaining.

    The "End Turn reports" already exist, and are an excellent tool. Instead of me manually copy/pasting dozens of posts to get the large text file we need, can we just get an "Total Turn Report" text report? that is simply a text file of ALL of the turns?

    Then I can run the parser, and see, wow I am -38 hits, and my opponent is +50 hits, meeting our "luck" differential, or Hit-Handicap is 88 hits to my opponent.


  • Admin

    @gargantua Can you provide an example of what you've been copy/pasting from each turn? Also if you have a sample of the output that your parser is generating that would be interesting to see. If its pretty simple or written in Java then we could consider adding it directly to TripleA as well.



  • What I have right now produces output of this form:
    ('Germans', [('1', 'submarine')], '0/1 hits')
    ('Germans', [('1', 'battleship'), ('1', 'bomber'), ('1', 'fighter'), ('1', 'tactical_bomber')], '1/4 hits')
    ('British', [('1', 'battleship'), ('1', 'cruiser'), ('1', 'destroyer'), ('1', 'fighter')], '3/4 hits')
    ('Germans', [('1', 'battleship'), ('1', 'bomber'), ('1', 'tactical_bomber')], '3/3 hits')
    ('British', [('1', 'battleship'), ('1', 'cruiser'), ('1', 'destroyer'), ('1', 'fighter')], '2/4 hits')
    ('Germans', 'British')
    from the description "Battle in Yugoslavia [...]"

    So I can basically just assign a handicap to each roll, sum it up for each country, and then keep a list of Axis/Allied countries and sum based on that



  • I just want to share the vision here.

    Imagine you've had a hell of a game against the toughest opponent you've ever faced... you barely squeak out the win, and are about to celebrate victory, but your opponent cuts you off a the knees with "Bah it was just bad luck".

    Using a Hit-Handicap system, that weighs the entirety of a games rolls, IE how many hits you got, vs how many hits you should have statistically got, will give you a hit handicap. In a perfect world, Each player should have a handicap of 0.

    But what I'm finding is that the Hit Handicap can vary wildly, and it can help explain some things. So in our example above, lets say we crunched that game, and I was lucky, my HH was +6 and my opponents was -4. I can then say well the hit handicap was only 10, really not that big of a deal. But if the hit handicap was +29 and -44 well yeah, for sure.

    Players can then also judge their skill level against a repeat opponent, I tend to beat so-and-so when the hit handicap reaches X value; that kind of thing. Also, for league or championship play, ridiculous hit handicaps could then be mitigated. IE if you end up with a HH of greater than 50, you earn one free reroll, or LL battle, or whatever everyone can agree to.


  • Admin

    @gargantua Ok, so you are copy/pasting the battle summaries out of each PBF post. So to create your example above you are taking something like this:

                Battle in Irkutsk
                    Japan attack with 3 japaneseMech.Infantrys and 4 japaneseTanks
                    Russia defend with 1 Flagpole, 1 russianAirfield, 1 russianBarracks and 7 russianInfantrys
                        Japan roll dice for 3 japaneseMech.Infantrys and 4 japaneseTanks in Irkutsk, round 2 :  3/1 hits
                        Russia roll dice for 7 russianInfantrys in Irkutsk, round 2 :  3/1 hits
                        3 russianInfantrys owned by the Russia and 3 japaneseMech.Infantrys owned by the Japan lost in Irkutsk
                        Japan roll dice for 4 japaneseTanks in Irkutsk, round 3 :  2/1 hits
                        Russia roll dice for 4 russianInfantrys in Irkutsk, round 3 :  1/1 hits
                        2 russianInfantrys owned by the Russia and 1 japaneseTank owned by the Japan lost in Irkutsk
                        Japan roll dice for 3 japaneseTanks in Irkutsk, round 4 :  1/1 hits
                        Russia roll dice for 2 russianInfantrys in Irkutsk, round 4 :  1/1 hits
                        1 russianInfantry owned by the Russia and 1 japaneseTank owned by the Japan lost in Irkutsk
                        Japan roll dice for 2 japaneseTanks in Irkutsk, round 5 :  1/1 hits
                        Russia roll dice for 1 russianInfantry in Irkutsk, round 5 :  0/1 hits
                        1 russianInfantry owned by the Russia lost in Irkutsk
    
    

    Parsing it into:

    ('Germans', [('1', 'submarine')], '0/1 hits')
    ('Germans', [('1', 'battleship'), ('1', 'bomber'), ('1', 'fighter'), ('1', 'tactical_bomber')], '1/4 hits')
    ('British', [('1', 'battleship'), ('1', 'cruiser'), ('1', 'destroyer'), ('1', 'fighter')], '3/4 hits')
    ('Germans', [('1', 'battleship'), ('1', 'bomber'), ('1', 'tactical_bomber')], '3/3 hits')
    ('British', [('1', 'battleship'), ('1', 'cruiser'), ('1', 'destroyer'), ('1', 'fighter')], '2/4 hits')
    ('Germans', 'British')
    from the description "Battle in Yugoslavia [...]
    

    Then I'm guessing you are parsing that to determine how many hits the Germans and British each should have gotten in that battle. So you end up with something like Germans got 4 hits and should have got say 3.5 hits. Then you add up all battles across all turns to get actual hits vs expected hits for each nation.

    If that is the case, then if all you want is an export of all the battles across all turns then that is already available. If you open game history and right click at the very top node on "Game History" and select "Show Detailed Log" then you get the entire history of the game that shows all the battle results and hits.

    We could look to add your parser logic into TripleA so that the information is available in game rather than having to export and use a separate parser.



  • So take a look at this... Excuse the WALL OF TEXT

    A Lopsided G1 REPORT

    Combat - Germans
    British scrambles 1 units out of Scotland to defend against the attack in 111 Sea Zone

            Battle in Yugoslavia
                Germans attack with 3 armour, 2 artilleries, 1 fighter, 6 infantry and 1 tactical_bomber
                Neutral_Allies defend with 5 infantry
                    Germans roll dice for 3 armour, 2 artilleries, 1 fighter, 6 infantry and 1 tactical_bomber in Yugoslavia, round 2 :  5/13 hits
                    Neutral_Allies roll dice for 5 infantry in Yugoslavia, round 2 :  0/5 hits
                    5 infantry owned by the Neutral_Allies lost in Yugoslavia
                Germans win, taking Yugoslavia from Neutral_Allies with 3 armour, 2 artilleries, 1 fighter, 6 infantry and 1 tactical_bomber remaining. Battle score for attacker is 15
                Casualties for Neutral_Allies: 5 infantry
    

    Axis HH +.3333
    Allied HH -1.6667

            Battle in 111 Sea Zone
                Germans attack with 1 battleship, 1 bomber, 1 fighter, 1 submarine and 1 tactical_bomber
                British defend with 1 battleship, 1 cruiser, 1 destroyer and 1 fighter
                    Germans roll dice for 1 submarine in 111 Sea Zone, round 2 :  0/1 hits
                    Germans roll dice for 1 battleship, 1 bomber, 1 fighter and 1 tactical_bomber in 111 Sea Zone, round 2 :  4/4 hits
                    British roll dice for 1 battleship, 1 cruiser, 1 destroyer and 1 fighter in 111 Sea Zone, round 2 :  0/4 hits
                    1 battleship owned by the British, 1 cruiser owned by the British and 1 destroyer owned by the British lost in 111 Sea Zone
                1 battleship owned by the Germans and 1 submarine owned by the Germans retreated to 112 Sea Zone
                British win with 1 fighter remaining. Battle score for attacker is 40
                Casualties for British: 1 battleship, 1 cruiser and 1 destroyer
    

    Axis HH +1.1667
    Allied HH -1.5

            Battle in 110 Sea Zone
                Germans attack with 1 bomber, 3 fighters, 2 submarines and 3 tactical_bombers
                French defend with 1 cruiser; British defend with 1 battleship and 1 cruiser
                    Germans roll dice for 2 submarines in 110 Sea Zone, round 2 :  0/2 hits
                    Germans roll dice for 1 bomber, 3 fighters and 3 tactical_bombers in 110 Sea Zone, round 2 :  4/7 hits
                    British roll dice for 1 battleship and 2 cruisers in 110 Sea Zone, round 2 :  1/3 hits
                    1 battleship owned by the British, 1 submarine owned by the Germans, 1 cruiser owned by the British and 1 cruiser owned by the French lost in 110 Sea Zone
                Germans win with 1 bomber, 3 fighters, 1 submarine and 3 tactical_bombers remaining. Battle score for attacker is 38
                Casualties for French: 1 cruiser
                Casualties for Germans: 1 submarine
                Casualties for British: 1 battleship and 1 cruiser
    

    Axis HH +.83
    Allied HH -.6667

            Battle in Normandy Bordeaux
                Germans attack with 1 armour, 1 artillery and 1 infantry
                French defend with 1 artillery, 1 factory_minor, 1 harbour and 1 infantry
                    Germans roll dice for 1 armour, 1 artillery and 1 infantry in Normandy Bordeaux, round 2 :  1/3 hits
                    French roll dice for 1 artillery and 1 infantry in Normandy Bordeaux, round 2 :  1/2 hits
                    1 infantry owned by the French and 1 infantry owned by the Germans lost in Normandy Bordeaux
                    Germans roll dice for 1 armour and 1 artillery in Normandy Bordeaux, round 3 :  2/2 hits
                    French roll dice for 1 artillery in Normandy Bordeaux, round 3 :  0/1 hits
                    1 artillery owned by the French lost in Normandy Bordeaux
                Germans win, taking Normandy Bordeaux from French with 1 armour and 1 artillery remaining. Battle score for attacker is 4
                Casualties for French: 1 artillery and 1 infantry
                Casualties for Germans: 1 infantry
    

    Axis HH -.167
    Allied HH +.3333

            Battle in 106 Sea Zone
                Germans attack with 2 submarines
                British defend with 1 destroyer and 1 transport
                    Germans roll dice for 2 submarines in 106 Sea Zone, round 2 :  0/2 hits
                    British roll dice for 1 destroyer and 1 transport in 106 Sea Zone, round 2 :  0/1 hits
                    Germans roll dice for 2 submarines in 106 Sea Zone, round 3 :  1/2 hits
                    British roll dice for 1 destroyer and 1 transport in 106 Sea Zone, round 3 :  1/1 hits
                    1 submarine owned by the Germans and 1 destroyer owned by the British lost in 106 Sea Zone
                    1 transport owned by the British lost in 106 Sea Zone
                    Germans roll dice for 1 submarine in 106 Sea Zone, round 4 :  0/1 hits
                Germans win, taking 106 Sea Zone from Neutral with 1 submarine remaining. Battle score for attacker is 9
                Casualties for Germans: 1 submarine
                Casualties for British: 1 destroyer and 1 transport
    

    Axis HH -.3333
    Allied HH +.3333

            Battle in France
                Germans attack with 5 armour, 2 artilleries, 6 infantry and 4 mech_infantrys
                French defend with 1 aaGun, 1 airfield, 1 armour, 1 artillery, 1 factory_major, 1 fighter and 6 infantry; British defend with 1 armour and 1 artillery
                    Germans roll dice for 5 armour, 2 artilleries, 6 infantry and 4 mech_infantrys in France, round 2 :  6/17 hits
                    French roll dice for 1 aaGun, 2 armour, 2 artilleries, 1 fighter and 6 infantry in France, round 2 :  1/11 hits
                    1 aaGun owned by the French, 5 infantry owned by the French and 1 infantry owned by the Germans lost in France
                    Germans roll dice for 5 armour, 2 artilleries, 5 infantry and 4 mech_infantrys in France, round 3 :  9/16 hits
                    French roll dice for 2 armour, 2 artilleries, 1 fighter and 1 infantry in France, round 3 :  0/6 hits
                    1 fighter owned by the French, 1 armour owned by the British, 1 infantry owned by the French, 1 artillery owned by the British, 1 artillery owned by the French and 1 armour owned by the French lost in France
                Germans captures 19PUs while taking French capital
                Germans converts factory_major into different units
                Germans win, taking France from French with 5 armour, 2 artilleries, 5 infantry and 4 mech_infantrys remaining. Battle score for attacker is 50
                Casualties for French: 1 aaGun, 1 armour, 1 artillery, 1 fighter and 6 infantry
                Casualties for Germans: 1 infantry
                Casualties for British: 1 armour and 1 artillery
    

    Axis HH +4.8333333
    Allied HH -6

    TOTAL AXIS HH = +6.663
    TOTAL ALLD HH = -9.168

    That's the best G1 I've ever seen, happend that I was Germany against a new League opponent. Being down 15 statistical hits on the first turn of the game... brutal...



  • @redrum Awesome! Thanks! I thought the info had to be there somewhere!



  • @redrum said in "Total Game Report" Option - For Statistical Purpose:

    We could look to add your parser logic into TripleA so that the information is available in game rather than having to export and use a separate parser.

    My Parser is broken at the moment, but that's exaclty the feature I would like if possible. IT would end alot of complaints and disputes! and would be a fun trend to review.

    What can I donate to see this coded into the game? 🙂 🙂 🙂

    @redrum said in "Total Game Report" Option - For Statistical Purpose:

    We could look to add your parser logic into TripleA so that the information is available in game rather than having to export and use a separate parser.


  • Admin

    @gargantua So decided to spend a little time seeing what it would take to add this. I added an expected hits per dice roll line and then a summary of the turn per nation at the end. Here is an example of what I have so far:

            Combat - Russians
                Battle in Ukraine S.S.R.
                    Russians attack with 3 armour, 1 artillery, 2 fighters and 3 infantry
                    Germans defend with 1 armour, 1 artillery, 1 fighter and 3 infantry
                        Russians roll dice for 3 armour, 1 artillery, 2 fighters and 3 infantry in Ukraine S.S.R., round 2 :  4/9 hits, expectedHits=3.50
                        Germans roll dice for 1 armour, 1 artillery, 1 fighter and 3 infantry in Ukraine S.S.R., round 2 :  4/6 hits, expectedHits=2.50
                        3 infantry owned by the Russians, 1 artillery owned by the Germans, 1 artillery owned by the Russians and 3 infantry owned by the Germans lost in Ukraine S.S.R.
                        Russians roll dice for 3 armour and 2 fighters in Ukraine S.S.R., round 3 :  3/5 hits, expectedHits=2.50
                        Germans roll dice for 1 armour and 1 fighter in Ukraine S.S.R., round 3 :  2/2 hits, expectedHits=1.17
                        2 armour owned by the Russians, 1 fighter owned by the Germans and 1 armour owned by the Germans lost in Ukraine S.S.R.
                    Russians win, taking Ukraine S.S.R. from Germans with 1 armour and 2 fighters remaining. Battle score for attacker is 5
                    Casualties for Germans: 1 armour, 1 artillery, 1 fighter and 3 infantry
                    Casualties for Russians: 2 armour, 1 artillery and 3 infantry
                Battle in West Russia
                    Russians attack with 1 armour, 1 artillery and 8 infantry
                    Germans defend with 1 armour, 1 artillery and 3 infantry
                        Russians roll dice for 1 armour, 1 artillery and 8 infantry in West Russia, round 2 :  2/10 hits, expectedHits=2.33
                        Germans roll dice for 1 armour, 1 artillery and 3 infantry in West Russia, round 2 :  2/5 hits, expectedHits=1.83
                        2 infantry owned by the Russians and 2 infantry owned by the Germans lost in West Russia
                        Russians roll dice for 1 armour, 1 artillery and 6 infantry in West Russia, round 3 :  1/8 hits, expectedHits=2.00
                        Germans roll dice for 1 armour, 1 artillery and 1 infantry in West Russia, round 3 :  1/3 hits, expectedHits=1.17
                        1 infantry owned by the Russians and 1 infantry owned by the Germans lost in West Russia
                        Russians roll dice for 1 armour, 1 artillery and 5 infantry in West Russia, round 4 :  4/7 hits, expectedHits=1.83
                        Germans roll dice for 1 armour and 1 artillery in West Russia, round 4 :  1/2 hits, expectedHits=0.83
                        1 infantry owned by the Russians, 1 artillery owned by the Germans and 1 armour owned by the Germans lost in West Russia
                    Russians win, taking West Russia from Germans with 1 armour, 1 artillery and 4 infantry remaining. Battle score for attacker is 6
                    Casualties for Germans: 1 armour, 1 artillery and 3 infantry
                    Casualties for Russians: 4 infantry
    
            Non Combat Move - Russians
                2 infantry moved from Novosibirsk to Russia
                2 infantry moved from Evenki National Okrug to Russia
                2 infantry moved from Kazakh S.S.R. to Caucasus
                2 fighters moved from Ukraine S.S.R. to Caucasus
                1 infantry moved from Buryatia S.S.R. to Yakut S.S.R.
                2 infantry moved from Soviet Far East to Yakut S.S.R.
                2 infantry moved from Yakut S.S.R. to Novosibirsk
                1 submarine moved from 4 Sea Zone to 2 Sea Zone
    
            Place Units - Russians
                1 infantry placed in Caucasus
                1 infantry placed in Caucasus
                1 artillery placed in Caucasus
                1 infantry placed in Caucasus
                1 artillery placed in Russia
                1 infantry placed in Russia
                1 artillery placed in Russia
    
            Turn Complete - Russians
                Russians collect 29 PUs; end with 29 PUs
    
            Research Technology - Germans
    
    Combat Hit Differential Summary :
    
        Germans : 2.50
        Russians : 1.83
    

    In this revised example, you can see both Russia and Germany had slightly above average luck turn 1 with Germany having a very slight edge.



  • WOW! That's exactly what I was hoping for! Nicely done! Any chance we could get this formally added to the game? and could the tabulation be continual over the entire game duration? not reset after each post?

    Having it split by nation would be awesome too... looks like you've already done that. The truth about crappy Italian performance will finally be revealed!


  • Admin

    @gargantua Red is Zeus!


  • Admin

    @gargantua Yeah, they are divided by nation. A total for the game could be added as well but most likely would be added somewhere else not in the individual turn summary as it is focused on just that particular turn. There is a menu option "Game" -> "Show Dice Stats" which shows total dice stats for the player's current session (not across save/load). I'd like to eventually change that to be the entire game (across save/load) and include more statistics like Hit Differential. It would also be nice to eventually have some graphs and such that show statistics for nations across turns (production, TUV, etc).

    Edit: The changes I showed above displaying expected hits per turn will become part of the next release unless any issues are found with them.



  • Yes!!! All of that sounds perfect. Let me know what I can do to help!


  • Admin

    The initial changes to add hit differential to each dice roll line and as a turn summary per nation will be included in this PR: https://github.com/triplea-game/triplea/pull/2807


  • Admin

    @Gargantua You can check out the initial changes that add the hit differential info per turn in the latest pre-release here: https://github.com/triplea-game/triplea/releases

    I've added the remaining portions of this request for a total game statistics to the feature request list as well: https://forums.triplea-game.org/topic/182/guidelines-and-feature-request-list



  • So I just tested this out on the pre-release; somethings not right.

    It lists every battle as expected hits 0.00?

    Maybe it's because I loaded an old save game and I can only tabulate once I have a new game going forward?

    I would attach the save file but I don't have priviledges yet. it's game 41042 at Axisandallies.org


  • Admin

    @gargantua Ah, I forgot to mention that it will only work for new games as old save games don't have all the data fields in the proper places for the calculations.



  • @redrum

    Understood Commander Murder.


  • Admin

    @redrum
    It would be awesome to have the "Combat Hit Differential Summary: " displayed with the "Battle casualty summary:" for each battle in the history tab (on right). Currently it displays TUV change and casualties only.

    This would be instant validation of how a battle really went and would alleviate the mostly false complaining about rolls.

    And then from there one can go look at the detailed summary in actual detailed history display (on left) if they want see exactly what caused the differentials.

    A bonus feature could be to have a link button at the bottom of "Battle casualty summary:" (on right) to take player to the exact location of the detailed history (on left).


  • Admin

    @general_zod So far I've added it to each dice roll battle line and in the end of turn summary. Could consider adding it per battle as well but figure I'll let people test it out first to see what they think.