Machine Learning for 9th age

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • DanT wrote:

    If a ML approach could do this
    I highly doubt it. The machine learning algorithms I know of need at lot of data. The more parameters (Profils, special rules, synergies) they need to take into account, the more data they need.
    So far we have more often than not lacked enough data to even provide proper data based statistic reports about the army to army balance let alone internal balance on unit to unit bases. What makes you think we can collect enough data to balance a pre-release army book?
    Trying to train an ML algorithm based on simulated data usually only results on training based on the faults you programmed into your simulation. Using a battle simulator for instance will consequently over value fighting power and disregard other factors such as movement/flexibility on the battlefield. A rather sure way of reducing wizard costs ;)
  • @tiny
    I think you are misunderstanding what I consider "data" in this case, and the use case I envisage, and the precision required for that use case.
    (But let us not have that discussion here-let's talk internally or by PM and I can explain in more detail).

    But regardless, I agree there are hurdles.

    Nonetheless, I see no reason for members of the community (who are keen to try it) to not investigate it, beginning with a limited case.
    That way at least your concerns can be quantified and evaluated.
    Rather than discarding a possible solution based on guesswork.
    List repository and links HERE
    Basic beginners tactics HERE
    Empire of Dannstahl HERE
  • Well, there are Softwares like AlphaZero that gather data on their own by playing again themselves.

    In a very simplified way, it tries to optimize what goes well each time it wins, and in parallel strives to identify and improve what it “done wrong” while loosing. Due to it very nature, the Software is able to play countless games in a rather ridiculous amount of time and can therefore move from utterly unable to make meaningfull moves (let alone implement simple strategies), to master a game in a very short period of time.

    It proved to be amazingly efficient with Chess and Go, but still have to “understand” the rule of the game, what with a system like T9A could be quite a challenge. In this respect, Software like Warhall could be the key to achieve any conclusive results.

    Product-Search Team

    +

    Lord of the Hobby

    =

    Lord of the Hobby

    :D
  • Caledoriv wrote:

    Regarding the stats, weapons and rules for each unit:
    I'd recommend parsing the LaTeX files that are used for the slim ABs. No additional step of transferring the rules into the proper format is needed then. And everything is there, includíng unit and base sizes, unit type and height.
    The actual effects of rules and weapons would have to be defined elsewhere, though. But that's probably has to be hard coded for any approach.

    The format is as follows:

    TeX Source Code

    1. \unitentry{%
    2. name=\mongrelherd{},
    3. logo=core,
    4. optionallogo=ambush,
    5. categorynote=\ambushcategorynote{},
    6. cost=140,
    7. unitsize=20,
    8. maxunitsize=50,
    9. costpermodel=8,
    10. scoring=yes,
    11. type=\infantry{},
    12. size=\sizestandard{},
    13. basesize=20\timess{}20,
    14. global@Ad=5,
    15. global@Ma=10,
    16. global@Di=6,
    17. globalrules={\packtactics{},\scoring{},\strider{\forest}},
    18. defense@HP=1,
    19. defense@Df=3,
    20. defense@Re=3,
    21. defense@Arm=0,
    22. defensearmour={\shield{}},
    23. offensename=\mongrel{},
    24. offense@At=1,
    25. offense@Of=3,
    26. offense@St=3,
    27. offense@AP=0,
    28. offense@Ag=3,
    29. offenserules={\primalinstinct{}},
    30. commandgroup={%
    31. \champion{}=20,
    32. \musician{}=20,
    33. \standardbearer{}=20,
    34. \alphaorderstickto{\standardbearer{}=20}\suboptionindent{}\bannerallowance{}=\nolimit{},
    35. },
    36. options={%
    37. \ambush{} {(\zerotoXmodelsperunit{30}, \zerotoXunitsperarmy{2})}=20,
    38. \spear{}=\free{},
    39. },
    40. } % END UNIT ENTRY
    Display All
    totally agree using existing documents is the way to go. Many software can create a workflow which can union all tex files together, clean the data if needed and create a database table out of it. Low cost could mean using something like Knime as it is free but ridiculously powerful. Where are the texfiled located? Id love to give it a try, although i need to step away from Alteryx, my go to software for this. But that is paid software.
  • Folkienn wrote:

    Well, there are Softwares like AlphaZero that gather data on their own by playing again themselves.

    In a very simplified way, it tries to optimize what goes well each time it wins, and in parallel strives to identify and improve what it “done wrong” while loosing. Due to it very nature, the Software is able to play countless games in a rather ridiculous amount of time and can therefore move from utterly unable to make meaningfull moves (let alone implement simple strategies), to master a game in a very short period of time.

    It proved to be amazingly efficient with Chess and Go, but still have to “understand” the rule of the game, what with a system like T9A could be quite a challenge. In this respect, Software like Warhall could be the key to achieve any conclusive results.
    The action/state space in T9A is far higher than Chess or Go. Yes it could be done, but you would need google levels of compute and the electricity usage of a small country (I'm not exaggerating). What Deepmind is doing with SC2 is really amazing but this sort of thing is far out of the reach for a community project for now.

    I'm sure interested people could do some great data science on tournament result data. Outside of this personally I can't see many good uses of ML for the project.

    FWIW I'm a 4th year ML PhD student.

    The post was edited 2 times, last by Gingersmali ().

  • DanT wrote:

    Nonetheless, I see no reason for members of the community (who are keen to try it) to not investigate it, beginning with a limited case.
    That way at least your concerns can be quantified and evaluated.
    Rather than discarding a possible solution based on guesswork.
    Sure! Have fun.

    If I raise concerns it’s just expectation management. Always happy to be proofen wrong by someone actually doing something.

    Folkienn wrote:

    Well, there are Softwares like AlphaZero that gather data on their own by playing again themselves. .
    True! But as @Gingersmali rightfully pointed out this kind of project isn’t quite a garage project of two dudes with a funny idea sitting in the basement of their mom.
  • Sander wrote:

    Caledoriv wrote:

    Regarding the stats, weapons and rules for each unit:
    I'd recommend parsing the LaTeX files that are used for the slim ABs. No additional step of transferring the rules into the proper format is needed then. And everything is there, includíng unit and base sizes, unit type and height.
    The actual effects of rules and weapons would have to be defined elsewhere, though. But that's probably has to be hard coded for any approach.

    The format is as follows:

    TeX Source Code

    1. \unitentry{%
    2. name=\mongrelherd{},
    3. logo=core,
    4. optionallogo=ambush,
    5. categorynote=\ambushcategorynote{},
    6. cost=140,
    7. unitsize=20,
    8. maxunitsize=50,
    9. costpermodel=8,
    10. scoring=yes,
    11. type=\infantry{},
    12. size=\sizestandard{},
    13. basesize=20\timess{}20,
    14. global@Ad=5,
    15. global@Ma=10,
    16. global@Di=6,
    17. globalrules={\packtactics{},\scoring{},\strider{\forest}},
    18. defense@HP=1,
    19. defense@Df=3,
    20. defense@Re=3,
    21. defense@Arm=0,
    22. defensearmour={\shield{}},
    23. offensename=\mongrel{},
    24. offense@At=1,
    25. offense@Of=3,
    26. offense@St=3,
    27. offense@AP=0,
    28. offense@Ag=3,
    29. offenserules={\primalinstinct{}},
    30. commandgroup={%
    31. \champion{}=20,
    32. \musician{}=20,
    33. \standardbearer{}=20,
    34. \alphaorderstickto{\standardbearer{}=20}\suboptionindent{}\bannerallowance{}=\nolimit{},
    35. },
    36. options={%
    37. \ambush{} {(\zerotoXmodelsperunit{30}, \zerotoXunitsperarmy{2})}=20,
    38. \spear{}=\free{},
    39. },
    40. } % END UNIT ENTRY
    Display All
    totally agree using existing documents is the way to go. Many software can create a workflow which can union all tex files together, clean the data if needed and create a database table out of it. Low cost could mean using something like Knime as it is free but ridiculously powerful. Where are the texfiled located? Id love to give it a try, although i need to step away from Alteryx, my go to software for this. But that is paid software.
    We're working on a public git repo for easy access to the latest files. In the meantime you can find a 2 month old or so version of the code here:



    Sander wrote:

    I can imagine a database already exists and is used for reference when making the tex files?
    It's actually the other way around ;D People as @flammy` or @Zikum have worked on extracting data from the tex files into databases, which are probably far easier to parse than the tex files.

    Slim Layout Coordinator

    Translation Coordinator

    Translation-Team FR

    I ♥ LaTeX

    Local Moderator (French)


    LaTeX... You fear to go into those complex interactions between packages. The dwarves coded too greedily and too deep. You know what they awoke in the darkness of TeX-dum... shadow and flame.
  • Eru wrote:

    Sander wrote:

    Caledoriv wrote:

    Regarding the stats, weapons and rules for each unit:
    I'd recommend parsing the LaTeX files that are used for the slim ABs. No additional step of transferring the rules into the proper format is needed then. And everything is there, includíng unit and base sizes, unit type and height.
    The actual effects of rules and weapons would have to be defined elsewhere, though. But that's probably has to be hard coded for any approach.

    The format is as follows:

    TeX Source Code

    1. \unitentry{%
    2. name=\mongrelherd{},
    3. logo=core,
    4. optionallogo=ambush,
    5. categorynote=\ambushcategorynote{},
    6. cost=140,
    7. unitsize=20,
    8. maxunitsize=50,
    9. costpermodel=8,
    10. scoring=yes,
    11. type=\infantry{},
    12. size=\sizestandard{},
    13. basesize=20\timess{}20,
    14. global@Ad=5,
    15. global@Ma=10,
    16. global@Di=6,
    17. globalrules={\packtactics{},\scoring{},\strider{\forest}},
    18. defense@HP=1,
    19. defense@Df=3,
    20. defense@Re=3,
    21. defense@Arm=0,
    22. defensearmour={\shield{}},
    23. offensename=\mongrel{},
    24. offense@At=1,
    25. offense@Of=3,
    26. offense@St=3,
    27. offense@AP=0,
    28. offense@Ag=3,
    29. offenserules={\primalinstinct{}},
    30. commandgroup={%
    31. \champion{}=20,
    32. \musician{}=20,
    33. \standardbearer{}=20,
    34. \alphaorderstickto{\standardbearer{}=20}\suboptionindent{}\bannerallowance{}=\nolimit{},
    35. },
    36. options={%
    37. \ambush{} {(\zerotoXmodelsperunit{30}, \zerotoXunitsperarmy{2})}=20,
    38. \spear{}=\free{},
    39. },
    40. } % END UNIT ENTRY
    Display All
    totally agree using existing documents is the way to go. Many software can create a workflow which can union all tex files together, clean the data if needed and create a database table out of it. Low cost could mean using something like Knime as it is free but ridiculously powerful. Where are the texfiled located? Id love to give it a try, although i need to step away from Alteryx, my go to software for this. But that is paid software.
    We're working on a public git repo for easy access to the latest files. In the meantime you can find a 2 month old or so version of the code here:


    Sander wrote:

    I can imagine a database already exists and is used for reference when making the tex files?
    It's actually the other way around ;D People as @flammy` or @Zikum have worked on extracting data from the tex files into databases, which are probably far easier to parse than the tex files.
    Yes,

    I work on export LaTex content to JSON format.
    I use it in the 9thbuilder to update the content of the database.

    For army list, I use the import list in the 9thbuilder from the 9th age discord FR.
    With more than 50 lists/tournament, it's a good source of data and it's possible to merge with the result of the tournament ^^.

    It's possible to work on this if you need it :)

    I am currently working of performance and clean of data with multi-language.
  • Where does one get the Latex files?

    As for a parser, I've written a python parser that reads the Battlescribe CATZ files. The output is a csv but I pretty much hold the content within the script is a table so you can use that for pretty much doing army analysts. The script does some updating of the stats updating the core stats if the unit has a GW.
    There is a lot of work you would need to do to add the variation you want but that is a start


    For Piteglio I've already written a parser that parses the Latex files of EoW units and provide statistical averages on what the combat expects and the randomized stats. This is written in Lua as my hope is to put it into TableTopSimulator
  • @kelvenmore see my post #32 for a link to semi-recent LaTeX sources. If you need the latest ones, ping me!

    Slim Layout Coordinator

    Translation Coordinator

    Translation-Team FR

    I ♥ LaTeX

    Local Moderator (French)


    LaTeX... You fear to go into those complex interactions between packages. The dwarves coded too greedily and too deep. You know what they awoke in the darkness of TeX-dum... shadow and flame.