ColePowered Games Ltd.
  • Navigation
    • Shadows of Doubt
    • Concrete Jungle
    • Older Projects
    • Jobs
    • Bug Report/Support
    • Contact
  • Search Icon
Search Icon

ColePowered Games Ltd.

The Game development adventures of Cole Jefferies.

Building Camelot The Build #3

Building Camelot The Build #3

March 24, 2014 colej Comments 0 Comment

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.

Twitter
Follow
Facebook
RSS

Uncategorized

Post navigation

NEXT
Building Camelot the Build #4
PREVIOUS
Building Camelot The Build #2

Leave a Reply Cancel reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About

Indie Games developer, currently working on detective simulator game ‘Shadows of Doubt’. I also made Concrete Jungle.

Twitter
Facebook
Instagram
YouTube
IndieDB

Development Blog

  • Shadows of Doubt
  • Concrete Jungle

Previously on ColePowered…

  • October 2020 (1)
  • July 2020 (2)
  • March 2020 (2)
  • January 2020 (1)
  • December 2019 (1)
  • November 2019 (1)
  • September 2019 (1)
  • August 2019 (1)
  • April 2019 (1)
  • March 2019 (2)
  • February 2019 (3)
  • January 2019 (1)
  • November 2018 (1)
  • October 2018 (2)
  • September 2018 (1)
  • August 2018 (1)
  • July 2018 (3)
  • June 2018 (2)
  • April 2018 (1)
  • August 2017 (1)
  • May 2017 (1)
  • March 2017 (1)
  • January 2017 (1)
  • December 2016 (1)
  • September 2016 (2)
  • August 2016 (1)
  • September 2015 (3)
  • August 2015 (1)
  • July 2015 (1)
  • June 2015 (3)
  • May 2015 (4)
  • April 2015 (4)
  • March 2015 (4)
  • February 2015 (4)
  • January 2015 (4)
  • December 2014 (5)
  • November 2014 (3)
  • October 2014 (3)
  • August 2014 (1)
  • July 2014 (1)
  • June 2014 (1)
  • May 2014 (2)
  • March 2014 (3)
  • September 2013 (2)
  • July 2013 (3)
  • June 2013 (3)
  • May 2013 (2)
  • April 2013 (4)
  • March 2013 (4)
  • January 2013 (1)
  • December 2012 (1)
  • November 2012 (2)
  • October 2012 (1)
  • August 2012 (1)
  • July 2012 (2)
  • June 2012 (2)
  • April 2012 (4)
  • March 2012 (2)
  • February 2012 (3)
  • January 2012 (3)
  • December 2011 (2)
  • November 2011 (4)
  • October 2011 (2)
© 2021   Copyright. All Rights Reserved. Designed by Freepik