Skip to main content

Crafting an artificial opponent for Fjordar


Fjordar is an epic, tactical strategy game for 1 to 4 players, set during the Norwegian Civil War. The game begins in the year 1130, when the old king Sigurd Jorsalfar dies. Each player begins the game as one of Sigurd's heirs or one of the other influential people in Norway at the time, who is vying for power in the vacuum left by the old king's death. Fjordar, BGG

A while back, after a lengthy exchange on ideas around this topic, the designer of Fjordar, Frode Brændø, asked me if I would be interested in helping out with designing a solitaire variant for this upcoming game. Of course I would!

Here are some brief notes on some from the design process.

Idea

We wanted to make an artificial opponent based the following criteria:

  1. Non-fiddlyness
    • Running the opponent should not lead to a lot of overhead for the player.
  2. Readability
    • The player should to some extent be able to read the artificial player enough to predict future actions and react to them.
  3. Keep gameplay
    • The gameplay loop should not change for the player.
  4. No player decisions
    • The player should not have to make decisions on behalf of artificial player.
  5. Keep scoring system
    • The artificial opponent should score points in the same way a regular player would during the game to recreate the race aspects of the game.

... and, on top of all this, it should be fun to play and be able to put up a good fight – even against Frode himself.

Inspirations

Even before “the current hygienic situation”, I’ve gravitated more and more towards solo games, or solo variants, for a fair share of my boardgaming, so a lot of the solutions to problems encountered creating an artificial opponent for Fjordar has, obviously, been inspired by other games.

Recently I have been particularly impressed with games by Shem Phillips and SJ Macdonald. And it is fascinating to follow the evolution of solitaire modes in games from Garphill games in general. Ranging from pure beat your own score of Explorers of the North Sea, via the simple “Automa”-deck of Raiders, and Architects, to the even more fascinating systems of Paladins and Viscounts where you can to a larger extent read the Automa player.

A lot of the resulting work is inspired by Morten Monrad Pedersen’s Automa concept – summed up in this short article. (That I, sadly, didn’t came across before a couple of weeks ago…)

Solution

From the onset we wanted a deck of action cards with a notion of deck building so that the artificial player would, like other players, get stronger through the game. This also lead to one of the ways we constructed more difficult-to-beat opponents – by adding a higher number of upgraded cards. (These cards are also inspired by the Automa focus concept from Viscounts of the West Kingdom.)

One of the most interesting mechanisms in Fjordar is the card play. Each round you play a card from your hand to your mini-tableau that gives you movement points and other bonuses as well as ways to break the regular rules, like the fan favorite “Winter” card where you can ski your units down mountains. On subsequent turns you can add cards to your mini-tableau, if you can afford it, or pick up all cards and restart it. This leads to these build ups of waves of powerful turns where you have a lot of movement points, before reseting back to less powerful ones. We thought that would be good to keep as a central component of the Automa player, if it was possible to do without adding too much cognitive load or fiddlyness.

Another important aspect in the regular game is, obviously, the units on the map. This, we figured we could leverage to improve readability, or predictability, of what the artificial opponent can do. The Automa has a range of operation around certain units based on its current movement range.

So, to kick off the testing process, after a lot of brainstorming, planning, writing, some simulations, and back and forth with Frode, I created a simple Automa deck based on the cards of the regular players – matching actions with movement ranges that seemed fitting.

Each action in the game is translated to actions of the Automa, with simple rules to follow, in classic MMP-style. This early in the process it had only one moving unit, the Hird, that moved around and performed actions based on it’s range (movement points). And, it was already fun to play! (Mainly due to the strength of the Fjordar game itself, of course.)

But how balanced was it? And could we streamline it further?

Simulations

I’ve always applied math and simulation to game ideas and puzzles – mine or the ones of others – to see if they… hold water. (I was happy to hear that the good folks of Garphill games does so too. (At least the math part, according to this great podcast interview at Board Game Design Lab. (They also reveal that they often design the solo mode at a very early stage for balancing purposes – and it shows in the resulting solo modes! (But I digress.))))

An example of where I applied simulations in this process is in the balancing of the battles between the player and Automa. Our first system for battles was that the player would chose and play a card as per usual, and then the Automa would draw two random cards and pick the one that would give him the most strength against the player.

(This clearly does not simulate all the bluffing, pushing of luck, and reading of opponents that goes on in the regular game, but is close, and “unfiddly” enough for our purposes here and it still leads to tense and exiting battles.)

My first simulation was around the hand size of the Automa. Are two cards enough? Too many? I fired up my Jupyter Notebook, created a representation of all the battle cards in Fjordar, and their interaction, before simulating how often the player would win in an even fight, given various hand sizes of the artificial opponent. And, lo and behold, after a mere 10000 virtual battles:

So, if the Automa, with a hand size of 2, is on equal footing to the player going into a battle the latter would win about 42% of the fights. That sounds good. But! the most important thing is that it is fun and feels fair, so, back to testing.

We realized that it was sometimes slightly fiddly to calculate strength for both Automa cards before comparing. Also, it could lead to the player having to make a choice on its behalf. Something we wanted to avoid.

What if we rather gave the artificial opponent bonus swords? Intuitively that would result in a similar shift. Back to the notebook, and after 10000 further fights (oh, the poor post-vikings…), it resulted in:

So, giving the Automa a one sword head start and drawing one card is fairly similar, baseline probability-wise, to giving it a hand size of two.

There are other aspects of battles I simulated to make sure that this system works, but I won’t go into more details here. (Maybe it could warrant another post at some point…)

Conclusion

And now, after many iterations and a lot of testing we have a version that is ready for other players to sink their teeth into.

The game will launch on Kickstarter by Go to Pieces Games the 28th of May but/and if you want to try out this beautiful euro- meets war-game for yourself (for free), Frode has made an excellent mod for Tabletop Simulator. As of Thursday last week this also includes a beta version of this solitaire variant!

It has been great fun to work, or, perhaps, rather, jam, with Frode on this project and I’m looking forward to hear what you all think…

Comments

Popular posts from this blog

Fix your rapid blinking Marantz SR-6004 using nothing but 3 fingers - and a thumb

A couple of years ago my (most of the time excellent) Maranz SR6004 acted up. It did't want to turn itself on. Properly. Just stood there and blinked rapidly. Its little red light that is. At me. The solution was so simple that I didn't bother to write it down as I was sure to remember it. Alas, no. Some weeks ago it did it again. (Can it be the heat?) Just stood there blinking rapidly at me. The manual just said - as it said last time around - that it was time to return the unit to it's maker. Or similar. Some googling led me to this page:  http://www.allquests.com/question/4056803/Marantz-XXX4-Series-Failure-Issues.html  The technical term for what I had experienced seems to be "The Pop of Death". Aïe. But!, humongous letters said: YOU CAN SOMETIMES RESET THE UNIT BY PRESSING SURR MODE, CLEAR AND EXIT SIMULTANEOUSLY And so I did. And so it was fixed. And all was well. (And now I have written it down for the next time.)

Fix upside down Skype video in Ubuntu 12.10 [UPDATED]

When launching Skype in 64-bit Ubuntu 12.10 on my Asus U35J the webcam image was all topsy-turvy. Since I don't live in Australia, or something (tsk-tsk), this was not really cutting it for me.  Some quick googling led me to this forum post:  http://forums.pcpitstop.com/index.php?/topic/198236-why-is-my-skype-video-showing-upside-down/   After making sure that the necessary packages was installed (notably  libv4l-0) I adapted the command from the forum post to: LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype and voila, the image was OK. Next step is for this to be set to default, which seems to be outlined here (in steps 2 and 3):  http://pc-freak.net/blog/how-to-fix-upside-down-inverted-web-camera-laptop-asus-k51ac-issue-on-ubuntu-linux-and-debian-gnu-linux/  (Actually this post seems to cover most of what is useful from the forum post above...) UPDATE (19/04/2013): Since my laptop was working fine, I decided it was about time to fix it. Also I wanted to

Using a Raspberry Pi as a MIDI USB/5-pin bridge

In my constant... need... to get everything music instrument related to communicate with each other, I wanted to look into ways to get some of my keyboards/synths with only MIDI over USB to talk to devices with regular good old-fashioned 5-pin MIDI ports from the eighties. Cables! First I had a quick look at off the shelf solutions. The most interesting one being the Kenton MIDI USB Host – providing MIDI host functionality for USB devices as well as regular MIDI in and out in a small box. Unfortunately it is rather expensive (~125 €) and a reliable online source warned me that it was not entirely stable in collaboration with my OP-1, so I started thinking of more... home-grown solutions. I decided to try to use my old Raspberry Pi and see if that would serve as a USB host with a borrowed MIDI USB adapter. (Thanks Simon.) A cheaper, and, as an added boon, a nerdier solution. Step 1: Get the USB MIDI device up and running This was the easy part. The device I have been lent