Tuesday 8 April 2014

Space - Tower defence game


I am starting on a game in Javascript that I am calling Space.

It is a tower defence game set on a space station. Aliens will get dropped onto the map at various positions and try to run into the space station's power source to destroy it.

The interesting twist that I am trying to put on this is that all actions will be controlled by the press of a single button (which will eventually be the Space bar). There is a scrolling set of buttons along the top and when you click on the action button the selected action is applied. I am still working on timing and speed of the game to make it playable. I want to make a game that is easy to play for anyone without having to do a series of complicated button presses and needing to know a series of hotkeys to become any good at it. All you need is to put the mouse in one place and keep clicking the button, later only the Space bar will be needed, but I am not there yet.

Here's an image of what I have so far:



At the moment it is not much of a game, there is a map with some red dots on representing aliens that charge to the light green area, which is the base. You are the blue thing. You can put down towers (dark green) that block the path of the aliens but don't fire yet. I am very much in the concept stage trying to get down my ideas and then polish it off.

I plan to do this in 3d where the characters are like tokens on a board game that slide across the board and are animated as they move. This is quite a way away yet while I am just trying to get the basics of the game done.

I hope you like the idea. More updates to follow.

Thursday 28 February 2013

Generating a 3D Mesh from a point cloud using Self Organising Maps

My latest project is investigating if it is possible to generate a mesh of a 3d surface using artificial neural networks.  The surface is to be defined as a 3D point cloud and the mesh is to accurately represent it.

I have an interest in artificial neural networks (ANNs) and their applications and this project gives me the chance to look at self organising maps (SOMs) in greater detail.  My previous work has generally been based on multi layer feed forward perceptrons, so this gives me the opportunity to look at a different field of ANNs.

Mesh generation seems to be a problem that a few of the main CAD systems are trying to solve at the moment and so rather than using mathematical and analytical methods, I aim to evaluate the suitability of biologically inspired AI for this task.

An example mesh for half a sphere:




Paul

Follow up on black jack card counting

For all those that were interested I am afraid I am going to park this project for now.  I spent some time looking into this but didn't find any strategy more efficient than those already discussed in my previous post.  I may return to this in the future, but for now I will start on a new project, which will be explained further in my next post.

Paul

Wednesday 7 November 2012

Evolving Blackjack Card Counting Strategies

I have decided that I would have a look into researching the evolution of blackjack card counting strategies.
Following a quick Google search I found a couple of interesting papers on this topic.  The first was “The Evolution of Blackjack Strategies” by Kendall and Smith,2003.  In this work they look to evolve an optimum blackjack strategy without using card counting.  Kendall and Smith state the house advantage over the player based on a series of known strategies, these have been reproduced here:
Thorpe’s Basic Strategy – 0.5%
Mimic the dealer – 5.7%
Never bust – 6.0% (est)
Typical casino player – 2.0% to 15%

I found it extremely interesting that a strategy has already been developed that doesn’t involve card counting that gives the house such a small edge, i.e. that developed by Thorpe.
The second paper was “Who’s Counting?  Real-Time Blackjack Monitoring for Card Counting Detection” by Zutis and Hoey, 2009.  This paper doesn’t aim to evolve a card counting strategy, rather it attempts to highlight players that may be using card counting to swing the edge in their favour.  Zutis and Hoey state that “70-90% of the edge developed by a player is applied by changing the size of the bet as the count fluctuates, whereas the remaining 10-30% of the advantage goes towards the ability to alter game decisions which, therefore, lead to a higher proficiency.”
My aim is to develop a series of card counting strategies and compare them in terms of profitability and simplicity.  For example, if a system is very simple, but you break even, then it is not really worth doing.  However, if the system allows you a massive advantage, but it is not humanly possible to carry it out, again, it is no use.
Since the majority of the edge developed by the player through card counting is via fluctuating bet size and that Thorpe’s Basic Strategy provided the house with the smallest advantage I decided to implement a basic game of blackjack and implement Thorpe’s strategy using card counting to influence bet amounts.  The basic game consisted of the normal game, minus the option of split and double down and all aces are counted as 11.  Each game cost $10 to play and the player started with $1000.  The fitness of each player was based on the number of hands played until the player went bust.  After 500 generations I found that my average number of hands played was very similar to that if I had just used Thorpe’s Basic Strategy without card counting (around 1,600 hands), whereas on occasion the maximum number experienced in a generation topped 10,000 hands.  I decided that my fitness function needs more work and that I should probably look to rate fitness based on average and variance of the return.  In this way I can reward good play instead of potentially rewarding lucky players that won through high risks.
That’s all for now.
Paul

Monday 27 August 2012

The Texan's performance so far

After a few weeks the Texan has been doing quite well.  Having played 123 games the Texan has won 74 games.  I'm fairly happy about that.  More won than lost. 

There are a few things that I have learned as part of making this poker player.  The main one is that you need to think about the inputs to an artificial neural network.  You may provide information that is required for the game, but you need to consider how easily it would be possible to evolve a network to interpret the inputs in the correct way.  Could you pass in the information in a different form which would make evolution easier?

I am also thinking about potential new projects.  I could expand on poker and make the Texan even better, or could move on to other areas, like Blackjack, Roulette or other casino games.  Or obviously I could go back to Desert Rat.  I have neglected it a bit due to having to work on the Texan and maybe I should look at that again.  I am not sure at the moment, I might give it a few days and have a good think.

Friday 10 August 2012

The Texan after 2 weeks

Ok, so Beat The Texan has been a Facebook app for two weeks now (http://apps.facebook.com/beatthetexan/ if you want the link).  So far I have to admit I haven't had the number of plays that I had expected, however, something is better than nothing.

I have included 4 different Texans in the game that are selected to play at random every a new game is started.  Overall The Texans have played 45 games and won 25.  Three of the Texans have a win rate of approximately 50-50 with the final Texan at around 70-30 to the Texan.

I am pretty happy with these results and it goes some way to showing that it is possible to evolve competitive poker players.  Admittedly, they aren't great players, but they are competitive.

Sunday 29 July 2012

Beat The Texan is now on Facebook

The Texan has been in training and is finally ready to take on Facebook.  Think you can beat him?  Find out here: http://www.facebook.com/BeatTheTexanCommunity