Developing Dominion: Day 4

May 26, 2012

(well, it’s really day 5, but post 4).

Anyway, a few small updates. Hopefully you can play it here.

  • The AI is still stupid. And it never takes advantage of any bonus actions.
  • I’ve implemented most of the “simple” core cards. If I’ve missed anything obvious, let me know.
  • I’ve started adding in some flexibility to my code so I can implement cards with “small print.” So far, the only one that I’ve added is the witch.

Plans for the next update mainly involve creating some simple algorithms that will allow the AI to play its current hand sensibly.
ie, instead of picking an action card from its hand at random, it should first play cards such as village which grant it addition actions. It should also aim to maximise the amount of money it will have in the buy phase. This is a pretty simple heuristic, although it doesn’t place any value on making other players pick up curses, or gaining the ability to buy more than one card.


Day 3 of my Dominion AI project

May 24, 2012

Ok, a few bugs have been fixed and I think the implementation is now playable. If you can find a bug, please let me know. Or any other suggestions![I have a sneaking suspicion that the player decks aren't working properly, but I'm not sure... will do some digging].

So, assuming I don’t find any more bugs, I’ll soon by able to start work on coding some AI algorithms :-) I’ll start with a few baseline dumb algorithms.

  • random1: play actions randomly, and buy cards randomly (although I’ll tell the AI to never buy curse cards.
  • random2: as above, but it will always try and buy the most expensive card it can afford.
  • big money: a common, simple and effective strategy. The algorithm only buys silver, gold or provinces.

I’ll also have to write some code to save game results for future analysis. :)

 

 


Day 2 of my Dominion AI project

May 23, 2012

Ok, no progress on the AI last night, but my code now supports human intelligence! (Ie, you can play against the AI. Which is useful for checking that the game has actually been implemented properly!)

Will I haven’t quite finished implementing the game rules, you can have a peak here if you like.

Known bugs:

  • the game currently doesn’t let you pass.
  • related to the above, if you play a card that grants extra actions, but have action cards to play, then you’re stuck
  • I need to give better feedback on what the AI is doing.

I’ll hopefully fix some of these tonight. If you spot any other bugs, please let me know. And also bear in mind that the AI is just playing randomly… it’s as likely to buy a curse card as anything else. Once I get the interface working a little smoother, I’ll start implementing some simple, and not so simple, heuristics.

 

 


A Little Coding Project: Dominion AI

May 22, 2012

Hello,

as part of my ongoing paranoia about future employment prospects, I’ve decided to work a bit on my coding skills, and building something that shows off some of my machine learning knowledge. I’m going to start with building an AI for the card game Dominion. The game itself is pretty simple (the Wikipedia article explains the rules, so I won’t explain it here), with two main decisions to make each turn:

Read the rest of this entry »


Starting a new band: worth the efffort?

April 22, 2012

So, I’m thinking of starting a new band. Or trying to find an existing one, but that seems unlikely. Although finding a collection of people to play with also seems unlikely. Where does one find musicians to play with? Gumtree? Hmmm. I think my biggest problem (beyond being an opinionated and argumentative so and so) is that I like a lot of different genres of music, and so trying to think of a description of what I’d like to play is somewhat tricky. Is there common thread running through Count Basie, Miles Davis, King Crimson, Brian Eno, John Martyn, Richard Thompson, Talking Heads, Tower of PowerPortishead etc?

I’m not really sure there is. There’s definitely nothing coherent there. And I think I like it that way. Put me in a rock band, and I’ll develop a longing to play around minimalism. Put me in a prog band, and I’ll want to play music people can dance to. And then I’d probably complain about the dynamics. Never happy, and I don’t have the attention span to actually master anything. [If I did, I'd be playing jazz.... At least, I'd play jazz until I wanted to rock out. And anyway, learning jazz bass seems to consist of learning a huge number of standards, and you only get to play with the good local musicians once you've proved yourself on the standards. I want to skip straight to the fun creative stuff].

None of this would make for a good advert on Gumtree. And all the good drummers are already in bands anyway. Any who aren’t can probably take their pick of bands, and I can’t see my vague, handwavey desire to do something interesting getting their attention to long. Especially as it’s probably at the expense of playing many gigs. [Good gigs are a lot of fun, but most gigs aren't good and the novelty of hanging around small music venues for hours and hours wore off years ago.]

Maybe I should concentrate on academia and go. There’s a backlog of novels to read on my bookshelf. Musically, I can probably keep myself entertained trying to master Bach’s cello suites.

But you know, there’s just something about being in a band.

 

 


Editing (Musical) Reality

October 4, 2011

I recently read Perfecting Sound Forever and found it a pretty thought-provoking read. In particular, the pros and cons of editing as a tool and process when recording music. As soon as you start editing and mixing music you’re no longer creating a record: the sound you end up with was never performed and furthermore, it’s potentially misleading (i.e. auto-tuning vocalists who can’t hold a note in tune). Where do you draw the line? Is there a line that should be drawn in the first place? Does it matter? The last question is the easiest to answer: of course it doesn’t. At least, it doesn’t matter what I do. I just play around my guitars and computer in my spare room :)

Read the rest of this entry »


snippet of a conversation with Dan

September 16, 2011

I know two Dan’s. They’re very similar in many ways. Both are great people, and great musicians.

Was chatting to (the Glasgow based) Dan just now, and he was asking if I’d like to play with his band. I was weighing up the pros and cons, and he came out with this:

give it a bash, its not like I’d stop being your pal if it didn’t work out, I’m too much of a pro that way

what happeend to your old bassist?

we fired him

That man has style.


Edinburgh Festivals 2011 : Jazz & Blues

September 12, 2011

Hello world. I thought I’d share my thoughts on the gigs I saw during the Jazz & Blues Festival. In general, I think the festival suffers from being too close to the almighty Fringe and International Festival. Tickets aren’t cheap, and while there are some good names, the line-up is never stunning (and by stunning, I mean something like the North Sea Jazz Festival… how did I miss that?!?).

Read the rest of this entry »


A week off work: Lots of things to do.

August 22, 2011

Well, my week off hasn’t started that well… spent the morning in work as I had a list of things that needed done. And now I’m home, and it looks like the week’s going to be pretty busy. On the to-do list we have:

  • Record Warr guitar parts for the next track on the Invisible Helpers EP. This will probably take longer than I’d like, but will be good for my technique… I’ll find out just cleanly I can play all those arpeggios.
  • Make some noticeable progress on some of the tracks for my collab EP.
  • Take my old fretted Warwick bass to Red Dog. The instrument’s action is all wrong (loads of fretbuzz) and I’m also wondering if I should get it re-varnished.
  • Start learning how to play lead-guitar style parts on the Warr. In particular, find where all the interesting notes are. I can find the obvious notes, and the wrong notes. Although I have a hunch that the problem isn’t with the notes at all: it’s how I play them
  • Play my ‘cello a bit. As the poor thing has been sitting in it’s case for too long
  • Read a few journal papers. Preferably over coffee.
  • Work out the best way to attach my pedals to my pedal board.

And finally, I’m also off to see the adaptation of the Wind Up Bird Chronicles in the Internation Festival, and Shooglenifty in the Fringe.

Lets see how much of that I get done.


One less excuse for not making good music

June 30, 2011

I finally gave in and took advantage of the 3 for 2 offer on Boss effect pedals. So I know reckon my effects board is complete…. tuner, volume pedal, compressor/sustainer, blues driver, chorus ensemble, fender deluxe, super octaver, and gigadelay.

Now I just need to get better at playing the Warr.

 

 

 


Follow

Get every new post delivered to your Inbox.