Hacker News new | past | comments | ask | show | jobs | submit login
Hammurabi: Classic game of strategy and resource allocation (hammurabigame.com)
58 points by ingler on Feb 6, 2015 | hide | past | favorite | 33 comments



It seems like if you sell off a little land in the first few years to plant as much land as possible, you'll keep having enough wheat everything going. Within a few years you'll be able to buy that back and then some.

And then you have a plague.


I don't get why people criticise the game here. If I understand correctly it's not really a remake but a copy of an old game which was simply made available to us with all it's flaws, bugs and other happy memories.


Hammurabi has been my go-to project to recreate in many of the languages I learn since the 80s. It's just complex enough that you can usefuly experiment with various features of a new language.

IMHO it's a case where the bugs are a feature. It's simple to implement but there are numerous small ways you can tweak it to make improvements. That make it a fantastic project for learning to program because completing the initial clone version is really just the starting point.


I think that's a really smart way to improve your coding. Recoding an old game is nothing too hard but offers enough challenges that you really need to use the features of the language you are learning.


Seems to depend a lot on RNG. If you get lucky with a good harvest and a plague in first couple years, it's smooth sailing to the end.


Yeah, I got two plagues and was able to do extraordinarily well. Not sure my subjects would entirely agree thought because, you know, plagues.


Same here, two plagues and end up with a quarter the population I had earlier, and yet apparently that's really good:

Hammurabi: I beg to report to you, In Year 11, 0 people starved, 3 people came to the city. The city population is now 64 The city now owns 797 acres. You harvested 4 bushels per acre. Rats ate 494 bushels.

In your 10-year term of office, 0 percent of the population starved per year on average, .i.e., a total of 0 people died!! You started with 10 acres per person and ended with 12.453125 acres per person


People loved me when I let 2.5% die of starvation but ended up with almost 11 acres per person, and hated me when I kept every single person fed but ended up with 8 acres per person.


The graveyard isn't a constituency with many votes.


It was for LBJ.


pithy


I remember we had to play this game in high school, back in 1983. I had a political science teacher who thought this was a very clever game. He was fascinated with the primitive simulations that were available then. There was another one where we had to manage a restaurant, buying ingredients and selling meals. I did very well with that one. Funny how everything became a lot more sophisticated within 10 years. 1983 was still the era of personal computers that had 16 to 32 k.


Reminds me of the Lemonade stand BASIC game on Apple ][. It was trivial to beat once I found out you could allocate negative funds to advertising and your account would end up credited. Then the stand just became a front operation laundering money through the print shop.


Although exploiting such kind of bugs is often reason to lose the fun in the game I really love the idea of having a lemonade stand for money laundering reasons because in the garage behind your stand you print money instead of ad flyers.


We played a game of world politics that was supposed to take a week. After the second day we destroyed the world with an atomic war. The teacher was pissed because he had nothing else planned for the next 3 days.


I really don't see how it can be seen as a favorable outcome (A fantastic performance!!! Charlemagne, Disraeli and Jefferson combined could not have done better!) when over a 10 year period, my population has dropped 62% and the state has sold off 16% of its land just to feed its people. Obviously that's not sustainable.


Yep, I first heard about Hammurabi in the book Basic Computer Games. Per the wiki, it was the first computer book to sell a million copies.

http://en.wikipedia.org/wiki/BASIC_Computer_Games


This game seems horribly buggy. It deducts bushels even when your move is rejected ("Thank again!".) Currently I have -2 bushels, but I don't think the concept of credit was intended to come into play.


I normally try to kill everyone off and sell everything off anyway but I haven't noticed the bug you're experiencing.


It disallows the move, but still deducts the resources. I don't have access to a real computer at the moment, but I imagine the bug would be easy to identify in the JavaScript.


The randomization is VERY sever in this. On 5 new games, always doing 2000 food and 800 seeds, i get a Year 2 bushel total of: 748, 800, 1650, 2800, 4000.

That is a 536% swing in return for [seemingly] identical starting conditions.


I translated to Scheme at my blog: http://programmingpraxis.com/2010/07/27/hamurabi-bas/.


I guess you do well if all your people die from the plague on year 10.


I would like a game like this, except that you play a central bank.


So, it now 404s which is a shame. I love these games. Does anyone know of a collection anywhere? Ideally, something I can download?


A playable version at archive.org [1]. And the Wikipedia page [2] has links to source listings. Apparently there was a Dylan port, but that 404s for me as well. And code listing for a BASIC version of it [3].

[1] https://archive.org/details/msdos_Hamurabi_1996

[2] http://en.wikipedia.org/wiki/Hamurabi

[3] http://www.dunnington.u-net.com/public/basicgames/HMRABI


The best approach is to go all in buying and selling land when the prices change. Ended with more population and more land per person.


It's discrete time stochastic dynamic programming problem.


I played this on a Tiki 100 back in the early nineties :)


Would be cool if you could play longer than 10 years!



aaand the server is down


Minor typo: it currently says: "Hammurabi: Thank again." on invalid inputs instead of "Hammurabi: Think again."




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: