The Tao of Gaming

Boardgames and lesser pursuits

Archive for the ‘Artificial Opponents’ Category

Time to make the ….

with 2 comments


(Amusing, not necessarily fun. Universal Paperclips achieved in 7 hours 3 minutes 21 seconds)


Written by taogaming

October 11, 2017 at 10:22 pm


Tired of working on my latest Factory, I fire up the robots for a few hands of bridge solitaire. I pick up the sort of hand you get in solitaire…

S:KQ7xxx H:A D:KQ62 C:xx 

(You get them because the computer deals out the hands, then swaps your hand with the best hand if you don’t happen to hold it).

Suprisingly, your robot partner opens 1 Heart. I bid 1 Spade and CHO bids 1NT. I bid 2 Diamonds (natural, forcing) and the CHObot admits to having two spades. I suspect four spades is cold and six spades is odds against, but I’m playing against robots and just goofing off. We’ll be light on points but maybe hearts will run (and I do have a sixth trump). Six spades it is.

I get the five of clubs lead and I don’t have time to wonder if I’ll be down before I won a trick because dummy is already tabled.

Dummy S:A9x H:KT9754 D:xx  C:Ax

Hand  S:KQ7xxx H:A D:KQ62 C:xx 

(Club 5 led by LHO)

That’s my type of opening … minimum. Well, I fly with the club ace and think. This is a decided underdog. Do I have any lines of play? In fact, I do see one. The nice thing about slam hands is that you usually don’t have a tangle of possible lines.

I win the club ace (naturally) and lead a heart to the ace. (Technically I should probably lead a spade the king and then cash the heart ace, but that’s a minor improvement and If hearts are 7-0 I think I would have heard something). I lead the spade king and then a spade to the ace, as spades break 2-2.

I needed that.

Next comes the heart king, pitching my losing club as LHO shows out. Uh, ok. I lead a diamond and it goes ten-queen-small. It looks like the diamond ace is onside.

I needed that, too.

But I also need RHO to have started with the ace and shortness (A, Ax, or Axx).

Nothing to do but lead a small diamond. LHO wins the 9 (RHO completing an echo!) and leads a club. I ruff the lub, ruff a diamond and … RHO plays the ace.

Score it up.

Once the diamond queen won, my odds were pretty good. RHO was known to have six hearts and two spades. Not much space for four diamonds and if he did have four, LHO had 8 clubs. I definitely think that would have been mentioned.

I also belatedly realize I missed another improvement.

If an honor had fallen on the second round of hearts, I would have had options. If RHO plays the honor I can play for him having QJx tight. If LHO shows up with an honor I could play for QJx tight or Hx. In the latter case I can run the HT for a ruffing finesse through RHO and (assuming it wins) get back to dummy with with a diamond ruff after losing the diamond ace and winning the other diamond, and pitch my last diamond on dummy’s good 9 of hearts.

I hadn’t considered it, but if the honor had popped up, I probably would have noticed. A minor demerit for not thinking about it ahead of time, but it turns out I had just enough luck on this hand.

Written by taogaming

September 24, 2017 at 9:25 am

Posted in Artificial Opponents, Bridge

Tagged with

Another timewaster request open thread

Well, Factorio was a good suggestion from the crowd (even if I balked originally). I’ve been knocking out various achievements (although I doubt I’ll get the “finish in 8 hours” one), but I must admit I’m casting around for something new. I downloaded OpenTTD (since the train engine is the same as factorio) but its a bit too old school for me. So … what computer games are you playing? (Remembering that my computer is not a gaming computer).

Update — After trying the demo of Desktop Dungeons, I sprung for the game. I’m actually not terribly fond of the entire leveling/building system (which strikes as similar to a freemium game) but the actual puzzels have a “nethack in 20 minutes”  nature. Some of the tiny 5 piece puzzles are stumping me, and I suppose the building/unlocking means that they can slowly introduce new things.

Written by taogaming

August 29, 2017 at 7:13 pm

Minor-Miner Update

Now that the boy is in camp, I have some access to the computer again, which means more Factorio. I get 50 hours into a base earlier this summer, but then six weeks away meant I had lost the thread. My power situation was OK but weird (some issue with heat pipes maybe being too far) and my trains were a mess, so I decided to start again. (I still have the save if I figure out the things I could go back to it). I’ve had a few false starts, so I keep resetting after a few hours.  I think I’m going to play the new one … build a small starter base and then build a main bus, and then perhaps a mega base. We’ll see.

I also did go-kart racing (work team builder) which lead to an injury. I knocked a shoe off while getting into the cart (It caught on the edge of the pedal) while switching off in a team-style Le Mans (“Which team can complete the most laps” during the event).  When reaching around/over the steering wheel to replace it I managed to strain every muscle in my core and left arm due to a spasm in that awkward position, which was not an injury I’d ever considered worrying about at a go-kart track. I consistently came close to the tree at the edge of the tight corner, but that just means I wasn’t dawdling….

It turns out that I am pretty good at the (~40MPH) beasts. Surprised me. (A bunch of racing games have given me a decent eye for the best line). Still, 30 minutes in 99° heat (with one break) and muscle spasms meant I was a wreck afterwards.

Thankfully I have tomorrow off to relax my muscles and work on my factory.

In other gaming news, Mrs. Tao did some old school D&D with her coworkers, while my (no-longer-minor) eldest mocked her during her absence.

Strange days, my friends, strange days.

Written by taogaming

July 20, 2017 at 10:51 pm

Posted in Artificial Opponents, Non-Gaming

Tagged with

Software is hard, but not that hard

I just got back from my vacation …. after a full solid 26 hours of airports and planes. It actually wasn’t horrible (apart from the four hour delay at JFK) because Delta planes have in-seat entertainment systems (and I had my books, of course).

The big game for the last two weeks (on the cruise, and in the airplane) was Boggle. (OK, the airplane’s game was the simpler “how many words can you find in this jumble for letters.”)

When I got home, I googled “Open Source dictionary,” because the last two weeks made me think those weren’t a thing.  Here are some words the cruises “Word finder” game didn’t accept:

  • cries
  • cried
  • makes

There were a ton of others. For a while I thought it was not allowing ‘s’ words (or multiple forms of the same word), abut other times it allowed all forms. That game also accepted a bunch of non-English latin words, acronyms, as well as frankly weird things like “ggg” and “Vneder” (but it rejected “Vender,” which is an archaic ‘vendor’.) [It shows a list of “words you missed” after each round, which is how I discovered these.]

It also accepted practically every name. I get that they can’t use the OSPD or SOWPODs (without ponying up licensing money), but downloading an OS dictionary takes literally a few minutes. (After playing for a while, I started mentally designing a “Boggle solver,” that won’t take forever. I may actually write it as an exercise, we’ll see).

Anyway, after spending way too much of my ship time playing Boggle (and being bewildered by dictionary) I played a few hours of “Letter Mix” on Delta on the way home. And I realized two things:

  1. After a dozen times I started seeing repeats of the puzzles (six letters).
  2. One set didn’t contain all the possible words in the solution. (They missed ‘hides’, but got ‘shied’).

And I realized that program didn’t have a solver, just a list of puzzles and acceptable words for each! Come on, this isn’t rocket science. (The Delta series of games definitely had a slapdash nature. The poker program had misleading english. “Player A raises to $2” when he actually raised a $2 bet to $4. And I suspect that the chess program had the “Easy/Medium/Hard” settings flipped, because I casually lost on easy unless I was paying attention, but on Hard the program just hung a queen for no reason.

Look — writing a good computer program may be hard, but some parts shouldn’t be. Get a good dictionary, people.

(My only other gaming news was losing in a cash no-limit game when my aces got cracked. In my last few cruises I spent a lot of time on the casino — I dislike cruises and may yet rant about that if I haven’t already — and after that I decided to just spend my sea time playing boggle instead, since in my two hours playing I couldn’t spot the fish).

I also murdered a few hours playing bridge, but on a cruise ship with random opponents that hardly counts as gaming.

Written by taogaming

June 20, 2017 at 2:25 pm

Factorio Tutorial — Simple Production Ratios

I see a fair number of questions on production ratios (on reddit) and amazingly, nothing on the wiki seems to deal with it, so here it goes.  (This is really just a draft I plan on cleaning up and putting on the wiki).

The beginner says “Aha, I need a ton of <insert something here> so I’ll build some factories for it.” Then the factories sit idle most of the time. Adding factories doesn’t work if you don’t have the necessary inputs. So, how to figure that out? The easiest way is decide how many outputs per second you want.

For simple things (such as red science) you can build a lot of factories because the inputs (copper + gears) are either fast to make or basically infinite. (OK, not really, but if you aren’t smelting enough copper you have bigger problems). But let’s consider science pack 3 (blue science). Here’s the formula (as of 0.15):

1 Advanced (Red) Circuit + 1 Engine Unit + 1 Assembling Machine 1 (Grey) and 12 seconds makes 1 blue science.

(Thanks to Dave McW’s wonderful cheat sheet for this).

So, the easiest way to is to target some # of packs per second. Let’s say you want one. Picking round numbers makes it easy.

As the old saying goes ‘You can’t make a baby in one month by getting nine women pregnant.’

But you can average a baby a month that way.

To average 1 blue/second, we need 12 factories. (I’m ignoring the speed multiplier for assembling machines. It isn’t actually 12 seconds, depending on the factories. If you have all blue assembling machines (level 2) and change everything to level 3s, the number you get will speed up, but there will be no bottlenecks or slowdowns if they are all even).

Rule of thumb — If you want one unit output per second, you need as many factories as the time it takes.(Again, ignoring speed multipliers). If you want Z per second, you need Z times the number of seconds it takes one factory.

So, we need 12 factories producing blue packs. Now the reason to pick a nice round number like “one blue a second” is that we now know that we need one red circuit per second, one assembling machine per second, and one engine unit per second. We have to have enough inputs.

So, what does an Engine Unit take to make?

1 Steel + 1 Iron + 2 Pipes and 10 seconds makes an engine unit.

In order to support one blue science a second, we need 1 engine per second, which means 10 dedicated engine assemblers. Similarly, we need six red circuit assemblers. We only need half of an assembly one assembler, since it only takes 0.5 seconds. We can make these factories dedicated for this output (which may make sense for some objects) or we may have a big production area (for, say red circuits) so that any overflow can be used elsewhere.

Let’s look at a more complex example: Production Science Packs (purple)

1 Pumpjack + 1 Electric Engine Unit + 1 Electric Furnace + 14 seconds gives us 2 production science packs.

If we want one purple per second, we need seven factories dedicated to production (since they produce two each every 14 seconds).  Every fourteen seconds our seven factories dump out their two purple each to give us one purple per second, and every fourteen seconds they each take in a pumpjack, electric engine and furnace.

So we only need 7 of each input per 14 seconds.

We need 1/2 of a pumpjack per second (or 1 pump jack per two seconds). Ditto the other two.

Electric Engines take an engine unit (sigh), 2x electric circuits and 15 units of lubricant and 10 seconds.

If we want a dedicated line we need five factories (for 1 every other second), which will also require 5 factories for engine units (again, one every other second).  (Remember our rule, we want Z per second. Z is “one-half” and the factories take 10s, so 0.5 x 10 = 5 factories.

“It’s really easy to forget the two outputs per unit time,” he wrote looking at his current factory and suddenly realizing why there’s such a backlog of electric engine units. Ah well, I can divert some of that production and my pump jack production….In fact, there are a number of practical matters. If you only use purple science packs intermittently, you can get by with lower inputs and you’ll buffer some up while researching things that don’t require purple).

So far we’ve just spoken of production speed, but if you start getting into big numbers, you may have to worry about throughput. Maximum throughput of a yellow belt is 13.33 items per second.  If you need 15 or 20 items per second, you’ll requirea faster built (or a second belt) otherwise the first factories in your line will consume all the inputs and choke off your remaining factories. For our examples, that hasn’t been a huge concern (although technically it means that our one purple per second is actually 13.33 purple per 14s, assuming we have perfectly packed yellow belts). But if we wanted to go to two per second, we’d need to upgrade our belts (red belts are exactly twice as fast). If we wanted to go to 5 a second, that would require multiple lines (or maybe having a staggered line where we produce a few intermediates, then a few purples. But that way lies madness).

You can do this to see compare if you have enough labs to consume your science production (or too many labs) although that’s tricky because the colors you need (and times) change based on what you are researching. But typically research takes 30s or 60s (some of the early game research takes less, and some military researches take 45 and braking speed takes 35!) If you produce one (of each color per science) then you can keep 30 labs working all the time, and your 61st lab is guaranteed to sit idle (assuming you never stopped), but in reality you will stop from time to time….

I haven’t done the math on launching one Rocket Per Minute, but throughput becomes a big concern.  1000 Rocket Control Units (which are required per rocket) requires just shy of 40k iron per minute, 650ish iron per second (smelting and transport). Of course those actually have a bunch of intermediate steps, but that’s 17 lanes of express belts just for iron. (In reality, its a bunch of trains to various outposts to make green circuits, etc). And rockets have a bunch of other parts.



Written by taogaming

May 2, 2017 at 10:26 pm

Posted in Artificial Opponents, Strategy

Tagged with

If you were borderline on Factorio

They’ve just released 0.15 (up to 0.15.2 for some bugfixes). I’m sitting here waiting impatiently for it to download. Nuclear power, rebalanced combat, a ‘marathon’ mode (critical items take a lot more materials to build), and prebuilt settings for various styles of play….

It is a sign of good sportsmanship on my part that I didn’t skip gaming to download it yesterday (when it released), but that’s only because I’d promised that I’d teach High Frontier.

Update — It’s slower going (7 types of science instead of 4 — and purple science is no longer “stuff you get for free by killing natives”). I’ve got a horrible spaghetti maze because I haven’t been looking ahead. I should probably punt, but my goal is to use this base as a starting point for a big base, so its ok. But I do like many things:

  • Flamethrowers are still good, but much more expensive. Bullets have been buffed, because they were terrible.
  • Infinite science (even if some of it seems to be a bad deal, like mining productivity).
  • Lots of quality of life fixes (showing oil patches underground, etc).

I need to get logistics bots for this factory. It’s not pretty. Gotta find a new copper patch, too. Have basically run out.

Written by taogaming

April 25, 2017 at 7:32 pm