This Week in Scrolls – Enhancing AI

earthen_splendor

 

We complete the circle of flavor with a new scroll from the next set, Echoes, and talk a bit about Daily Trials. Let’s plant our feet and dig in.

 

Flavor of the Week

We’re on to the last of the four factions for our Echoes flavor text contest. For those who haven’t been keeping track, that means it’s Growth time.

In the past, Growth has bonded with the Earth and mirthed with the Earth. Now it’s time to… look, Growth likes the Earth, OK?

Introducing Earthboon:

earthboon_scroll

Look at the smirk on that smug gentleman’s face. He just knows how angry he’ll make you.

As always, we are looking to add your flavor text to the bottom of this scroll. You get one submission, so give us your best!

Enter the Contest Here

What Echoes scroll would you like revealed next? Order, Energy, another Growth? Why don’t we let you choose? Vote for the next Echoes scroll reveal in this scrollsguide thread!

 

 

Daily Trials – how do they work?

Many of us enjoy playing in the relatively new Daily Trials, but their construction can seem somewhat random at times. I assure you, this is not the case at all. I spoke recently with the mastermind behind the Daily Trials system, Jon, and asked him to elaborate more on precisely how each trial is generated every day.

Here’s a brief rundown on how the trials you see in game each day are developed:

trials

As we all know, each trial has different conditions for both the player and the opponent. How do we arrive at those conditions?

Step 1: Assigning themes

Firstly, for each trial, a theme is randomly selected for both the player and the opponent. There are five possible themes: Growth, Energy, Order, Decay, and Wild. The theme is used to select the starting units, bosses, enchantments, reoccurring spells, and the opponent’s deck. Additionally, a random subtype for each group of starting units is also selected. In the above example we can see that the player’s theme has been selected as Growth and the opponent’s theme has been selected as Energy.

Step 2: Board generation

With that out of the way, the board is setup based on the selected themes. Units are placed on the board based on probabilities, with idol health and starting resources randomized. At this stage, the opponent selects an appropriate deck from one of the already existing Hard AI’s collection.

Step 3: Simulations

Here is where the magic happens. The system now runs actual game simulations for each scenario to determine difficulty and ensure player victory is possible. A simulation consists of two Medium AI’s playing the potential trial sixteen times. Medium AI is used over Hard AI for performance reasons.

Depending on the desired difficulty, certain conditions must be met in these simulations in order for the trial to be accepted:

  • Easy Trial: The player’s AI must win at least 14 times out of 16.
  • Medium Trial: The player’s AI must win between 8-14 times out of 16.
  • Hard Trial: The player’s AI must win between 1-3 times out of 16. At least 1 ensures that it is possible to win.

If a condition is not met – the board is adjusted. If one side appears too weak, a unit or boss is added to that particular side. The simulation is then run once again.

If a condition can still not be satisfied – the setup is cleared and a brand new simulation is run.

Once the desired condition is met, the setup code for the trial is generated to be used in game and is labeled as Easy, Medium, or Hard.

Eventually, we end up with one trial for each difficulty. Every day.

Pretty cool, huh? The interesting thing about it is that the difficulties can easily be adjusted any time we’d like. For example, if we ever wanted to make an “Insane” Daily Trial, we could just set the condition for the player’s AI to win 1-3 times out of 100 games instead of 16. Scary thought, right?

As a final thought, Jon has also been working on improving the game’s AI in general. It’s actually been enhanced as recently as last week. You may have noticed the Hard AI getting a little smarter. It’s a delicate balance of system resources to provide a tough opponent while not affecting server performance too significantly.

If you’re a fan of Jon’s work, give him a follow on twitter and let him know. Good job, Jon!

 

Tournaments

There are a lot of tournaments and events in these next couple weekends- so much that I had to make an entire post just to highlight them earlier this week. You can find it here.

Now would be a great time to take advantage of Roastedbeanpotion.com‘s event calendar on the right sidebar.

If every event goes as planned, it will be the most Scrolls community events in two weekends there has ever been to my knowledge. Am I wrong?

“No, Atmaz, you’re never wrong.”

Thanks!

-Gary (@Atmaz)