Monday 16 June 2014

Be collaborative

As much as I would love to, I can't do everything by myself; I can start this project by my own, but then I would need some help from the community. That's the main reason why I will use a web-based hosting service for software development, GitHub, to share the code of my simulator and foster collaboration between developers. On top of that, hosting services like GitHub offer file backup and revision control, both very useful features in every software project.

GitHub, as the name suggests, is a hosting service that use the Git revision control system. The reason why I'm using a DVCS rather than a standard client/server version control (like SVN) is more an experiment. In the past, I've always used SourceForge and SVN as my hosting service. I'm now looking forward to testing a distributed model and take full advantage of local repos.

Finally, I adopted GitHub because of its integration level with other platforms and applications. I develop software applications using Eclipse (spoil!), a well-known IDE for Mac, Windows, Linux. Eclipse / GitHub integration is achieved quite well via EGit, but when I'm on my iPad (see this post - sorry, only Italian), what IDE can I use? I tried different iPad apps, but none of them were any good. I eventually bumped into Orion, a web IDE developed by the Eclipse guys. Orion allows cloning GitHub repos and develop applications through a web-browser. I'm still a bit sceptic about the practicality of this service, but I suppose I can give it a go.

Ah, almost forgot to mention. My repos are:


So far, I only uploaded all the files in GitHub. There is no readme, no branching strategy or any other cool stuff. Stay tuned!

Friday 13 June 2014

Some (non-obvious) rules

Isn't blackjack the game that you win when you have a 21? Just make a function that randomly gives you a few numbers, and whoever gets to 21 wins. Project sorted!

Ah, if only it could be that easy. Before cracking on with design, I must have a better insight of what I'm going to design, which means I must increase my domain knowledge in the blackjack game. Lucky we live in the 21st century, Internet can give all the answers to my questions.

I'm most definitely not going to write a post on all the different blackjack rules. As my old professor used to say, this would be a "minestra riscaldata" - "same old story". Here is the list of websites I had a look before starting with the design:


As you can imagine, blackjack game has got tons of rules, variations and strategies. My simulator will be flexible enough to accommodate all these combinations. Whatever software I'm going to write, it won't require recompiling the whole application each time a blackjack rule is tested, a new variation is simulated or a new strategy is introduced.

Tuesday 10 June 2014

Goal and strategy

As I mentioned in the introductory post, the main idea behind this project is to find the "perfect" blackjack game strategy. The perfect game strategy is a strategy that maximises the chance of winning one or more blackjack games within the game's rules.

In order to achieve this goal, I will create a framework to compare different blackjack game strategies. This framework will be a blackjack simulator, an application software able to simulate a blackjack game according to a set of casino rules and player strategies. During the course of the game, this application will collect data for statistical purpose. The simulator will run enough games in order to collect statistical-relevant data, and will organise those data for analysis once the simulation is completed.

The simulator will be flexible enough in terms of configuration settings. Simulator users will be able to change the configuration settings, such as game rules or player strategies, without being asked to re-compile the application.

The secondary goal of this project is to keep myself up-to-date with new technology. I will always try to experiment new frameworks, libraries or techniques, or simply adopt patterns never used before.

That's it. I tried to keep the goal and strategy statements pretty simple and straight forward. At any point in the project, I will be able to review the work done so far against the original goal and strategy and make sure I'm on track.

Oh, just one more thing: I didn't mention any deadline. I haven't got a deadline for this project. We are told by purists that one of the characteristics of a project is that there is a definite start and end-date. Well, my project hasn't got a deadline. This project has got a start date - when I initially thought about the simulator, some time last year - but no end date. This project will be completed when the first goal is achieved.

Let's kick off with some design now!

Monday 9 June 2014

Introduction

Blackjack simulator blog is all about the ancient science of sword making. Ah ah. I'm joking, of course. My name is Luca Cacchiani, I would like to introduce my blackjack simulator, spread it to the world and eventually become millionaire.

A little bit about myself. Like almost every superhero, I work for a respectable company during the day - a digital agency based in the City of London. I enjoy good pub food for lunch and jogging along river in the evening. But at night time, when I take my shirt and trousers off and put my hoody and sweatpants on, I become a java developer. I do understand it's not as cool as being Batman or Superman, but hey, I'm still a geek, even in my 30. And unlike Batman or Superman, my identity is fully disclosed on my cv, my blog (Italian), my facebook / twitter / linkedin / google+ profile. It's hard to keep secrets nowadays!

Rolling back to the purpose of this blog. The goal of the blackjack simulator that I lazily developed is to compare the results of different blackjack strategies through a java simulator. The goal of this blog is to document all the work done so far, discuss future development, gather idea and possibly build a community of people interested in the same subject.

If you happy to participate in the discussions, please use the appropriate comment boxes at the end of each and every blog post. Feedback is always appreciated!