Building Camelot The Build #3

28012014

I’m writing this having just completed my first attempt at implementing AI. It’s working! Mostly! How often is it beating me at the game? Sometimes. It’s not dominating, but it’s rarely far behind in terms of points. It has beaten me a few times although the lucky bugger did get the better tiles! I am not a Camelot The Build pro though, or even much of a competent player myself, so it remains to be seen how good this ai really is. I don’t expect it will ever be able to challenge the best players of this game. Camelot requires more cunning than I am capable of squeezing out of the math operations which currently make up it’s brain.

I talked a little about what I was planning to do a few weeks back, but I’ll go into detail about what I ended up with.

First off, last time I said that making it calculate all the highest scoring places to put it’s tiles was going to be straightforward. Nope. I wasn’t thinking about how the scoring system of the game gives points from adjacent tiles, gardens or the score doubling. This made things much more complicated and actually was the hardest part of the whole thing. The rest of the ideas I had last time made it in though.

In a nutshell, the AI analyses all it’s possible plays and effectively makes a pros/cons list for each one. If an actual human attempted this it would lead to an incredibly boring and drawn out game, but computers tend to be pretty quick at this sort of thing when numbers are involved! Although currently not quick enough, as there are hundreds of potential plays near the start of the game and it takes a little time to calculate– something I’ll be working to refine in the coming weeks.

Alpha-3-01

The pro column consists of the total score it can get this turn, and that’s pretty much it. Simple. I’ve added a little incentive to score off of already placed tiles though- these plays will weigh higher in it’s decision making process.

The cons column is a little more complicated and consists of 1) how much potential there is for an opponent to score from the tiles it’s just played, and 2) the perceived ‘worth/future scoring potential’ of the tiles it’s using.

1) counts up the probability of the opponents having the surrounding tiles and combines that with the points they can get from the tiles it can put down. This was an attempt to stop it from playing it’s most valuable tiles right away for it’s opponents to play off (although in some situations it still does play them fairly early because it decides the points it will get is ‘worth it’). This is a tricky balance to get right I am finding. If I make this variable too conservative, the ai will pass on some opportunities to score massive points which may not be there in later turns. Too aggressive means it will lay down it’s highest scoring tiles at times where an opponent can get a similar or better score by using average tiles.

2) This is something I came up with after I found the AI frequently wasted it’s garden tiles where it could of just used an empty tile. It’s reasoning was that garden tiles are worth 1 where empty tiles are worth 0, so to get the most points this turn I’ll use that garden now (even though the garden wasn’t being used to it’s full potential by scoring off diagonal tiles). So I had to come up with a system, separate to the points in red, that gave value to special tiles like the garden tile. This is a value assigned to each tile based on it’s worth, I guess in essence this is it’s maximum scoring potential. At the start of the game this value is at it’s maximum because there is the biggest chance it can be used to it’s full potential at some point in the game. This value is dropped as the game progresses because that chance lowers. This value is part of the ‘cons’ list, so it will count against it in the decision making process. This ensures tiles like the garden tile will only be played when it can score enough points to ‘overcome/justify’ this value.

I hope all that makes some kind of sense. In the next dev blog I should be telling you about how the presentation is progressing as well as improvements to the AI.

facebooktwitterredditpinterestby feather

Building Camelot The Build #2

28012014

Hello once again everybody, I hope you are all having a great week. Here’s part #2 of my Camelot The Build development blog, a board-to-digital conversion I am doing with Wotan Games.

alpha2_04

The main difference since last time, as you might notice, is the scoring is more or less completely working now. The counters at the top show how many points the tile placed is worth (red), how many points it gains from surrounding tiles (brown/green icon), then the total for that tile (blue). There are three sets of these, representing the 3 tiles a player can place on their turn, then finally the accumulated total with an indicator to tell the player whether the score is doubled from placing 3 tiles end-to-end.

alpha2_02

The game is progressing well, and I would estimate I am nearing the half way mark to total completion. We have the game in more or less a completely playable state, albeit with just local hotseat players. The next step I think is to add in some AI- basic at first, but something I can build on and make more complex over the course of the rest of the project.

So, this week I’ve been planning and working out how a computer can play Camelot The Build. It’s probably one of the more challenging tasks of this project- my others games up until now have not had AI with big decisions to make. This is completely different…

At time of writing I am about to implement my first ideas on how this could work. What needs to be done initially is have the ai calculate high scoring positions for it’s three tiles.  This should be fairly straightforward, and just involve looping through all the possible tile locations and combinations. I’m not sure having it scan every combination is viable, and I could end up having ai with harder difficulty settings scan more combinations than an ai on an easier setting. So I will likely build a system that calculates obvious places first- using high scoring tiles (placed or in-hand) to start the analysis.

But Camelot The Build has more strategic depth than just laying the tiles with the highest score of course. We also need the ai to be wary about other players scoring off it’s placed tiles and getting more value out of them than it did. This is where things are going to get complicated! It needs to take into account the free spaces around the tiles it wants to lay by having a rough idea of the probability that the other player(s) have a tile that will score off it. This obviously needs to be more of a priority for high scoring tiles than low ones.

So, with all that in mind, I’m going to build a system where the ai assigns a value to each combination of tiles it could play. This value will consist of the number of points it can get this turn with that combination minus the risk (amount of game points + probability that other plays can score off it). Then it will order that list, and the combination of tiles with the highest value is the one it chooses. Done!

There are lots of different variables I can plug into this. Stuff like the aforementioned number of combinations it checks, how aggressively it wants to score points vs how much it wants to keep others from scoring etc. I might even make it able to screw up it’s maths a little!

There’s also the issue of the last tile being played counting double against you. This is probably something I’ll implement later- I just want to get the basics working for now. But this is going to have to be incorporated into the decision making process at some point.

alpha2_03

The weird thing about developing all this is that I won’t know how effective it is until I’ve completed the system. Which is very unusual for me, as I usually get to see how well stuff is working as I’m making it.

So in my next update I’ll hopefully be telling you how badly my ai is beating me at the game!

facebooktwitterredditpinterestby feather

Building Camelot The Build

28012014Hi folks, it’s been too long!

In the time since my last update and the release of Six O’Clock High, I’ve been working on some new projects. For my next project I’ll be working to help board game developer Wotan Games bring their new release, ‘Camelot – The Build’ to the digital world. Wotan got in touch with me a while back about developing a digital version. It’s a great little tile-based castle building puzzle game, with an emphasis on when and where you place your given tiles.

The cogs started turning on the project in Janurary, and I’ve been working on getting the game into a state that can be used as an early demonstration for their kickstarter campaign which went live literally just now!

01

It’s a competitive game where each player is assigned pieces of the castle. Players can place up to 3 pieces per turn, with each piece having an assigned value. Points are scored from adjacent tiles and if 3 pieces are laid end-to-end then the total score is doubled. The tiles continue to be dealt until all the pieces are placed, at which point the game ends and the player with the most points is crowned the winner. That’s it in a nutshell. An Arthurian nutshell.

03

The game will be able to support up to 4 players via local or online multiplayer, or you can just play against the AI, or mix n match those options to make up to 4. The board game itself has been getting very favourable reviews, so if this looks interesting to you I would definitely recommend giving them a visit and giving the tabletop version a try.

Gameplay2

Right now we have a very early and rough but playable build. It’s coming along well, but there’s still a lot to do. The map is working, a lot of the UI features are working but need developing. There is no AI or multiplayer functionality as of yet either. But the good news in that I’ve found development to be very smooth, and I haven’t hit many problems.

In true multi-platform spirit, there’s also a greenlight campaign, so a thumbs up there would be greatly appreciated. We’re aiming for a release date of Q4 2014 with a release on  iOS, Android & PC. Follow me or @WotanGames for updates.

facebooktwitterredditpinterestby feather

Six O’Clock High is Released Now!

SOCH is released today!

Hello! I’m posting to announce that Six O’Clock High has finally been released! It costs around $1 or regional equivalent, and is available on a large range of platforms. Links below:

Available now on iTunes!Available now on Google Play!Available now on Amazon App store for Kindle!Available now for Windows Phone 7 & 8!Available now on Xbox Live Indie Games!Available to play as a flash game!

It’s been a funny project. This originally started as a very short project– intended to be completed in weeks, those weeks turned into months. The main reason is the multi-platform release, which I have never done simultaneously before. But what I have here is perhaps my most polished and best-looking release. It’s also the smallest and most accessible. Like ‘Sleigher’, it’s action-heavy, intended as something that’s easy to pick up and play.

I hope you enjoy. Here are some promotional codes for iOS:

WNHL7WTP9EFH
TWRT96NWK6XF
463NPE9YL9XW
KLL4RRH63N63
P49PXWHRNP9L

Here are some for XBLIG:

T7MYY-PGKV2-K3GDQ-JYDTC-MHWDG
MQ6X2-TTFF3-RMWFQ-FY7BX-GDB3J
MY798-XY8TR-PCRYD-6B3GT-FPQVB
F39J2-3WGJB-W84B7-R4VXP-FR4QQ

I’ll be posting more promo codes on Facebook & twitter throughout the day (and the week most likely)!

facebooktwitterredditpinterestby feather