Turning Ninth Age into a computer game/simulation, with AI

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

The latest issue of the 9th Scroll is here! You can read all about it in the news.

Our beta phase is finally over. Download The Ninth Age: Fantasy Battles, 2nd Edition now!

And on December 24th, Father Chaos brought us... A brand new army book for Daemon Legions!

  • Eldan wrote:

    It's really, really not
    Well the rules for minimal wargaming are also pretty simple, and don't rely on complex constructs like liberties, connectedness and superko (check for repetition against all previous states).


    Eldan wrote:

    Combat resolution is far more complicated
    there wouldn't be any. It would just be a table lookup (more like how De Bellis Antiquitatis works)

    Perhaps the most important difference is that wargaming has a somewhat larger branching factor if you discretize as I suggested but it has vastly fewer moves (6 as opposed to hundreds)

    The post was edited 1 time, last by Auto2 ().

  • The thing is, I can write you a program that can check if a go move is legal in an afternoon. Writing something that moves a square unit and checks if the move is legal along the entire lenght?
    Sie beobachtet
    Ewig kennen ihre schwarzen Augen die Ewigkeit
    Uralt, zeitlos, belauert Nukuja die Äonen, Zeuge des ersten Erwachens und des letzten Verhängnisses
    Ihr Wissen schlummert wie ein endloser Ozean
    Unsere Göttin, allumfassend, von der Heuschrecke bis zur Eule
    Ihr mächtiger Schlaf erschüttert das Erdgestein, Ihre Wacht entfacht die Sterne
    Sie regt die Gläubigen an zu warten, die wahre Lauterkeit der Geduld, und Ihr beizuwohnen während…
    Sie beobachtet
  • I also study machine learning, trying to write a 9th age reinforcement learning agent that plays the game to any decent level would be mad, like cutting edge stuff, get deepmind involved and we might be talking. Search space is massive and the game is high variance, then you have army building as well. Go look at Dota bots, and you see that while progress is being made we are not here yet, and I would argue T9A is a "harder" game to learn than dota. Doing this just to try and improve balance is silly IMO.

    Writing a bot that uses simple heuristics to simulate games would have limited value. Simple heuristics could not be expressive enough for how and when yo use chaff etc etc.

    As others have suggested adding a feature to UB, where you could submit you lists before the game and it would record the game for analysis would be a far better idea IMO. Depending what data you wanted to gather this would likely mean completely re-writing UB or producing a new T9A version.
  • Gingersmali wrote:

    a bot that uses simple heuristics to simulate games would have limited value. Simple heuristics could not be expressive enough for how and when yo use chaff etc etc
    I strongly disagree with this! In the world of balance, you don't need to know when to use chaff, you just need to know that chaff might have a certain amount of value and you represent that value as a parameter which can be estimated from looking at hundreds of real lists that include chaff (and spend a certain amount of points on it).

    Gingersmali wrote:

    feature to UB, where you could submit you lists before the game and it would record the game for analysis
    IMO this is not going to help with balance. We already have very clean data in the form of high-level tabletop tournaments. Data from UB wouldn't be of a higher quality - it would almost certainly be of low quality as people wouldn't be playing highly optimized games. It also wouldn't be of a larger quantity.

    But on the plus side, it's probably pretty easy to do implementation
  • Auto2 wrote:

    Gingersmali wrote:

    a bot that uses simple heuristics to simulate games would have limited value. Simple heuristics could not be expressive enough for how and when yo use chaff etc etc
    I strongly disagree with this! In the world of balance, you don't need to know when to use chaff, you just need to know that chaff might have a certain amount of value and you represent that value as a parameter which can be estimated from looking at hundreds of real lists that include chaff (and spend a certain amount of points on it).
    Maybe I am failing to see the bigger picture, how would data from a bot that couldn't play the movement phase be useful?
  • Gingersmali wrote:

    Maybe I am failing to see the bigger picture, how would data from a bot that couldn't play the movement phase be useful?
    Because it can approximate the movement phase by randomly generating a series of matchups between units, and knowing which units will win against which other units with what probabilities is a huge part of balance.

    It is useful to know that (for example) goblin spearmen lose against (for example) clan warriors with a certain probability. Both units have almost exactly the same behaviour in the movement phase so there isn't much point in simulating it. The part where they differ is combat, leadership and shooting.

    And the advantage is that the parts of the game with a huge amount of between army variance (stats, combat-oriented special rules etc) also happen to be the things that are really easy to do in an automated way.

    The parts of the game that rely heavily on the movement phase (e.g. value of fast cavalry) are copy-pasted across many armies and therefore quite easy to impute from real-world data such as prices and popularity.

    For example, take the price of a unit of goblin wolf riders. Subtract away the price of a unit with the same average combat power but without the fancy movement rules. Repeat across many different armies. You should get a relatively consistent answer for the value of those movement rules.

    The post was edited 1 time, last by Auto2 ().

  • I totally agree one could program a combat fighter / shooting shooter / spell effect resolver that outputs a distribution over outcomes given units, kit, alignment, auras and spell effects etc etc. This would be very do able, bit tedious to program all the effects but once thats done pretty simple. I see this would be useful for balancing two units with the same movement in the same book. Apart from that I think its value would be limited. The game is played in the movement phase and I don't see how you could added movement rates / synergies into this in a meaningful way. Would love to be persuaded otherwise.
  • Gingersmali wrote:

    I don't see how you could added movement rates / synergies into this in a meaningful way.
    You model them as parameters and impute them from real-world data ... just like in many other machine learning problems

    E.g. as above you can't calculate how mich the movement 9/18 and light troops attribute is worth, but you can create a parameter for it and fit that parameter to the data we already have about how things are priced, what people take in lists etc.
  • Gingersmali wrote:

    Seems like theres two ideas going on here:

    Yeah basically I agree with this.


    I think that in the short-term:
    • you will not get useful balance data from a full game simulator/agent
    • you will not get fun or interesting AI gameplay from an agent that tries to include every little detail of T9A 2.0
    Maybe in the long-term they can meet, especially if T9A 3.0 has substantially simpler core rules

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

  • New

    I don't think IA tech (soft/hardware) is ready for rules as complex as 9th age yet. I think we'll have to wait for quantum computers/neural processors to become standard.

    In the meantime what about 9th age derived games (ie. based on the 9th age setting but using other simplified rules)? I was thinking about something on the lines of World of Battles (servers closed now) or Total War Arena (they are closing servers so there's an open niche to take). I'd be very happy to get involved in such a project as it's my dream type of game.
  • New

    Astadriel wrote:

    what about 9th age derived games (ie. based on the 9th age setting but using other simplified
    well one thing I was thinking about is whether it would be a good idea to play a war game with movement sticks (like in x-wing) so there are a finite number of possible moves. I think it would speed up in-person play as well as make it easier to simulate. This would make the movement phase a finite problem and the AI could search like you search for moves in chess AI.

    What do you think?

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

  • New

    Auto2 wrote:

    Astadriel wrote:

    what about 9th age derived games (ie. based on the 9th age setting but using other simplified
    well one thing I was thinking about is whether it would be a good idea to play a war game with movement sticks (like in x-wing) so there are a finite number of possible moves. I think it would speed up in-person play as well as make it easier to simulate. This would make the movement phase a finite problem and the AI could search like you search for moves in chess AI.
    What do you think?


    At the risk of eating planning fallacy myself, I don't think defining the space of possible moves is a limiting factor. This is calculable. (In fact, it's something that's easier with a computer than without it).

    More relevantly, so much of the game is about paying attention to angles (who can you see, who can see you), that to artificially limit movement would be killing the game. Literally 90% of the game is the movement phase, and small differences in unit angle make huge differences in consequences. This is literally the mechanics that need to be right to simulate the 'game'.
    Just because I'm on the Legal Team doesn't mean I know anything about rules or background in development, and if/when I do, I won't be posting about it. All opinions and speculation are my own - treat them as such.

    Legal

    Playtester

    Chariot Command HQ

  • New

    Squirrelloid wrote:

    Literally 90% of the game is the movement phase, and small differences in unit angle make huge differences in consequences.
    But this is perhaps an aspect of our genre of wargaming that needs to change.

    1. It's very off-putting to newcomers
    2. It's extremely unrealistic that a tiny change in angle swings a whole battle.
    3. It's very time consuming to micro-optimize movement so much
    Movement should matter but not in the sense that you lose a game because a chaff unit is 1mm too far to the left.

    If should matter because you have a plan and set things up so that 2 turns from now you will be able to get a flank charge, or you hid your cavalry in a forest and drew out the enemy for an ambush, you manoeuvred so that you got good matchups.

    And actually a lot of what I consider to be tbe more interesting parts of movement often get overruled by bad rules like units being stubborn even if they get flanked, units having huge damage output to the rear, being raised from the dead at ridiculous rates in combat, units being too mobile in sideways charges.
  • New

    Auto2 wrote:

    It's extremely unrealistic that a tiny change in angle swings a whole battle.
    well, slightly wrong angles are THE thing to swing a battle. having your angle wrong by 1° in tournaments means 0:20 often, since the difference between seeing and being seen as well as flank or front are the most curcial thing in the game.

    Either the system for angles in such computer game works 100% accurate and perfectly or developing the game is not even worth the effort at all imo.
    WTC OPEN 2019 - 26.-28.04.2018 in Herford worldteamchampionships.com - an official T9A event
  • New

    Unfortunately I don't think there is a way to get around point 2 in the 9th age frame work, unit are either in combat or not and there has to be some sharp boundary when these things change.

    When playing in IRL its pretty easy to verbally confirm placement with your opponent does what you intend, which gives some lee way for error which reduces your point 2&3. Its worth noting with a computer this is easy to do this.
  • New

    Frederick wrote:

    well, slightly wrong angles are THE thing to swing a battle. having your angle wrong by 1° in tournaments means 0:20 often, since the difference between seeing and being seen as well as flank or front are the most curcial thing in the game.
    Yes but I am say that that's unrealistic and makes for un-fun, slow, nitpicky gameplay, and ideally the game should change in the future to make micro-optimization of position less important.

    How to implement that is another matter though.