How I Broke Neptune's Pride 2

Gaming is an intuitive hobby, and there are some problems in the gaming world only a human can solve. Whether a game is "fun", is wholly subjective. But through the use of a fun spreadsheet trick, it's possible to achieve near perfect balance by isolating a game's overpowered strategy. For fun, I used it in Neptune's Pride 2 -- and became overpowered in the process.

Shuffled away in my “Other Bookmarks” folder in Chrome is my group of bookmarks called “Design Crap”, where I put all the game design theory stuff that no one else on the media side of things seems to be interested in. Everything in that folder is fascinating to me. Articles about designing combat systems, what we know about human senses and how that effects our perception of game aesthetics, and of course, the psychology of game design, unethical and otherwise.

While I don’t get as much time as I’d like to sit and explore that folder, I’ve made time for one blog which has held my interest for months, called The Intelligence Engine, in which a man named Paul Tozour explains how techniques used in finance and other operational roles are changing one of the oldest pieces of accepted wisdom in game design: that there’s no formula for fun.

Using evolutionary algorithms, Tozour is able to simulate hundreds, thousands of games on a computer to find the ideal strategy for his two-player competitive tower defence game, City Conquest. The algorithms throw insane amounts of numbers at the problem, and return the best result. Balance, and the desired types of balance, is a necessary element of fun in such games. That makes this technique a valuable tool in finding the fun in a system, and something a QA team could only accomplish with considerably more time (and cost).

Tozour uses the algorithms not only to balance test games, but also to make design decisions. As the blog shows, it’s just as useful for finding the optimum locations for galactic warp gates if you want them as close as possible to particular planets, or calculating the quickest paths between all your objectives. Machine learning is growing in popularity in development circles, and I interviewed Tozour about the technique in the first issue of the new Grab It Magazine.

The most fascinating thing, however, is the ease of participation. These aren’t big, expensive tools or algorithms we’re talking about. Sure, those exist -- but everything mentioned above can be done in Excel, or LibreOffice. Anything with a Solver tool using genetic algorithms. I had to have fun with this.

So began possibly the nerdiest thing I’ve ever done, and I loved every second of it. Loading up LibreOffice, my goal was to optimise the first seven turns of Neptune’s Pride 2. The 4X genre is ideal for this kind of theorycrafting -- with all the formulas in place, one can start a new game, enter in all the variables, and have the spreadsheet solve for the ideal player moves. Whatever the game requires -- tax rates, infrastructure built, etc -- the algorithm can calculate exactly what you should do for the optimum result. The perfect build order.

NP2 is about building ships to conquer stars, to build more ships, to conquer more stars. I built my spreadsheet around the amount of ships built by my empire, up to the seventh turn, then told the Solver to optimise the “Total Ships Built” cell. It was a massive spreadsheet, riddled with errors, and the first few (okay, many) attempts yielded no results. Even with the errors fixed, the Solver was crumbling under the weight of myriad variables. I had included Economy, Industry, and Science buildings on each star, as well as what Science I should be researching at any given point in time. As Science affects infrastructure and vice versa, it was a loop of variables feeding back to each other. And amongst it all was a complex formula (and at one point referring to a separate Python script) to calculate the cost of buildings, the cost of which rises if you build more than one in a turn.

It wasn’t going to work until I reduced variables, so I found a few shortcuts: It’s fair to say that when you start researching something, you don’t change halfway through, so I took out the variables for what to research every single hour. Then I removed it altogether, since the Solver would always tell me to research Manufacturing, and in reality, early game empires should be trading for all tech anyway.

Then I took out the ability to get more than one building at any star during one turn, since that’s rarely done in the early game -- even though it broke my heart to discard those toiled-over formulas. A few other smaller shortcuts later, and tweaks such as making sure the Solver spent as much money as possible every turn, and it was working. I would tell it to optimise my game of NP2, and it would spit out a number. After playing around with the numbers in the spreadsheet, I found that I couldn’t improve the result at all.

To test it, I brought on the help of former GameArena editor Joab Gilroy, with whom I regularly play Neptune’s Pride 2. We played an isolated 1v1 game, in which I was able to bring 844 ships to bear against his 549 on the eighth turn. I deemed it a success.

Next was testing it in the wild, where no amount of theorycrafting would save me from the fundamentally diplomatic nature of the game. Two vs one never goes well for the one in NP2’s early game. But if I could avoid being double-teamed, I should be able to make a decent start.

After a few 8 player games, and a few 64 player games, the spreadsheet continues to win. Sometimes the scientific test itself is ruined by an AFK or some diplomatic happenstance, but no matter the game, whoever the poor schmuck next to me is has the maximum amount of ships possible coming their way before long, and I gobble up that empire for a good start to the game.

It’s a good bit of fun, if you’ve got the dedication, and I’ll be looking for other games to try and break using the same method. To some, it’s understandably a little farther than they’re willing to go in terms of formulating the ideal strategy, and one friend even described it as hacking. But it’s an enjoyable new way to theorycraft, while teaching oneself about spreadsheets and algorithms, not to mention a new aspect of game design.


Comments

    This is one of the more interesting articles i've read on here lately. I've been covering this sort of stuff in Uni over the last couple of weeks, and it had me thinking that there must be an optimal way of doing things in these sorts of games.
    Unless the game mechanics are kept extremely basic, theres always going to be some way that just plain works better.
    I wonder how many designers are aware of these patterns while making the games..

    Designers need to strike a balance here, no 'solvable' game will ever maintain popularity (I'm talking years here), the end point will always be the same strategy playing against itself. Neptunes Pride gets around this by building diplomacy mechanics around the systems, like how poker and backgammon added betting mechanics to what would otherwise be solved games, ensuring an element of humanity in the systems.

    A lot of people are tricked in to thinking a strategy game is well designed because it takes a long time to go up the learning curve to reach perfect play, when truly well designed games will add something to those mechanics that mean mastery of them is only the starting point.

    I think the ever changing nature of games has resulted in less focus being placed on this balance than should have been, a game being solvable and having a strategic ceiling didn't matter because a sequel or the next best thing would come out either before that point is reached or shortly afterward.

    Anyway, great article. It's encouraging to see systems studied like this. The more this is encouraged the sooner metagame becomes more prominent in video game design, from the complicated social dynamics of Neptunes Pride to the encouragement of perfectly built but simple systems such as Nidhogg or Samurai Gunn bringing the mastery point down far enough that in a single session you are already playing the man, not the ball.

    Last edited 02/03/14 3:42 pm

    any chance you are happy to make this spreadsheet available? thanks in advance

    There is a game called Cosmic Supremacy. www.cosmicsupremacy.com. Similar to Neptune's Pride too, in a sense that it's also a slow-form, turn-based space strategy game, but complex in its own way (3D galaxy map, customisable automated micromanagement)

    I'm one of the player-admins there (as in I play quite a bit and the developer lets me run some stuff on the site), and just recently we were using spreadsheets to try and balance some aspects of the game.

    I think maybe you'd be interested to check that out too?

    Diplomacy!
    I would love you to try this theorycraft on Diplomacy the board game.
    I love that game so much for it's unbreakable, flawless, in my opinion anyway :)
    The rules can't be exploited! If someone is a no-show, drops out or throws the game....that's all accounted for!
    It's such a meta game, that all the strategy and/or mathematics can't account for decisions made purely of a personal nature. i.e. "I like him better so I'm gonna ally with him" or "I'm coming after you just because." Even though said decisions aren't the best strategically.

    Let me know!

Join the discussion!

Trending Stories Right Now