The Castle Doctrine Forums

Discuss the massively-multiplayer home defense game.

You are not logged in.

#1 Re: Main Forum » Problems with setting up server » 2017-12-11 12:34:22


Hmm sorry, don't think I had any problems with the ticketServer.
It's part of minorGems, which is actively maintained.

#3 Re: Main Forum » New "cheatproof" test server » 2017-12-07 11:45:06


Thanks for your thoughts. I think you're right to identify the problem that
players who can afford enough backpacks to bruteforce their way through a
house in the end don't risk anything, because they get all the backpacks they
spent along the way back when they finally get to the vault.

I've just implemented a simple fix for this: now when you die in a house, your
backpack and its contents are auto-sold and the proceeds go into the house's
vault. So a proportion of their value disappears and can't be won back.

Chills don't work if we assume players have sockpuppets.

Forcing players to leave some money in their vaults is a good idea. It's
actually already part of the system I implemented on this server. You have to
leave 200+(0.1*houseValue) in your vault before you can buy anything.

#4 Re: Main Forum » New "cheatproof" test server » 2017-12-06 11:12:30


If you die you just lose tools. That necessarily includes the backpack, which is quite expensive. Permadeath doesn't make sense as a penalty, because we're assuming everyone can have sockpuppet accounts to risk rather than their main account; losing the backpack is the substitute.

#5 Re: Main Forum » New "cheatproof" test server » 2017-12-05 12:39:37


The competition houses have some random noise applied to make finding an optimal solution difficult even if you're familiar with the base house.

How did you find robbing others' houses? Any annoying lag?

#6 Re: Main Forum » Improved Chill Timeouts for smaller populations » 2017-11-14 13:44:46


Amazing what a huge effect such a tiny tweak can generate...
Good thinking, jere and jasonrohrer.
And the "squatter" theming is perfect.

#7 Re: Main Forum » Improved Chill Timeouts for smaller populations » 2017-11-13 00:02:09


Looking forward to trying this out...
as for the previous game-breaking strategy - yes, it wasn't just a matter of
getting down to $0, you also need to be robbed once. Sticking the vault by
the door has worked for me.

#8 Re: Main Forum » Improved Chill Timeouts for smaller populations » 2017-11-12 02:20:52


Making abandoned houses (intermittently) robbable like this actually solves
another problem with the game: currently, if you take seriously the goal of
trying to keep your family alive, the surest way to do it is to get down to $0
and drop off the list. Then as long as you don't do anything more in the game,
your family is safe.

#9 Re: Main Forum » Improved Chill Timeouts for smaller populations » 2017-10-28 07:02:20


I still quite like the "competitions" I implemented for the cheatproof server
as a way of using old maps and preventing the game seizing up when there are
few players. Details are in another thread, but basically they work like this:
you see the blueprint of the map, and try to get to the vault in as few moves
and using as few tools as possible. A competition is open for a certain length
of time, and at the end whoever found the best solution wins some prize money
(the idea being that you're developing the plan for your local crime
syndicate, and the prize money is your cut).

So competitions are clearly differentiated from the rest of the game, and the
amount of money they inject into the economy is easy to control. Because of
the blueprints and the optimisation aspect, the original owner doesn't have
much of an advantage. In my implementation, the maps also had some random
noise applied to keep things interesting.

#10 Re: Main Forum » New "cheatproof" test server » 2017-02-23 12:46:36


I've just put up a new version ("35002"), source and windows binaries
available from .
The main change is the addition of competitions, essentially as described in
this thread.

I found a nice way to thematicise them: your "friends" in more-organised crime
are planning jobs on rich houses, for which they have blueprints, and will
give a cut to whoever can find the cheapest plan for a robbery.

Currently the base maps are some old ones of mine I found on my hard-drive.
Many of them are from old versions of the game and don't really work anymore,
but the random noise means they still kind of do the job. Any house worth at
least $4000 whose owner suicides will get added to the pool.

I'm hoping the competitions will suffice to deal with the problem of getting
things going.

So anyone lurking on this thread - now would be a good time to give this
version a go!

#11 Re: Main Forum » New "cheatproof" test server » 2017-02-19 03:37:51


I see no wall.

The important thing is to have activity in the game, which in economic terms
means circulation of the money. There's no reason in principle that this
should require money creation - even in a completely closed system, there can
still be flow of money between players. Think not of a pool being splashed by
a fountain, but of a roiling pot of water on the boil. The players generate
the movement themselves.

The one problem with this is that sometimes in the course of this activity, a
player can end up with no money at all. What happens then depends on the
details of the dynamics, but let's say first that a player with no money is
ignored by the system - they end up at the edge where the waters are still.
This is also how a new player starts, hence your inductive arguments. So
there should be a way to push such a player back in to the turbulent region,
i.e. for them to obtain some money. Money creation of the kind we've been
discussing can be a means of doing that - a targetted jet to push a player in.

So what I'm seeing as the key point is that the system doesn't have to be
*driven* by money creation. Money creation can still be used as a tool to
prevent pathological behaviour, but it need play no more than a supporting
role. The players drive the system, by identifying and enacting opportunities
for gain. Make sense?

Probably further tweaks would help, measures to try to keep players away from
the edge so the jet is needed less. The minivaults helped with this, giving a
backup to make destitution less likely. Making the rescaling redistributive
might also help.

#12 Re: Main Forum » New "cheatproof" test server » 2017-02-18 14:31:19


> Unless players are offered an infinite load-out budget at the start of the
> puzzle house.  Then you CAN use loads of tools, without paying for them, but
> the goal is to use the fewest.

Yes, that's exactly what I had in mind. And actually there's no need to have a
buying stage at all - 8 tool types can be chosen when the map is generated,
and competitors just automatically enter the map with an inexhaustible supply
of each.

> Still seems like it would take too long to bootstrap people.  You need to
> have a time window and a contest deadline.  In the N=2 case, this really
> doesn't work well.  After someone submits their best try, they're
> essentially sitting around waiting for the results to come in.

Well, they can work on improving their best try, knowing that the other player
may be doing the same. This may not be all that much fun, and I hope people
won't spend much time on it when the main game is functioning properly. But I
don't think we need the game to be massively fun to play in these extreme
situations, as long as they don't last for long.

> For the same reason, we cannot allow other players to design the "state"
> houses for us, because we can't make sure the people robbing those houses
> are not the designers.

If you mean the houses for the competition: I think it makes sense to provide
blueprints - and then given blueprints, the random noise, and the rather
different aim from normal, the advantage of already being familiar with the
house fairly small. So using old houses as the base should be ok.

> Anyway, I think there needs to be a way for money to enter the game that has
> no timer or waiting period attached to it.
> On the other hand, it also needs to have some skill or difficulty attached
> to it, or else it will be subject to grinding as a replacement for robbing
> and other activities.

If it's possible to get enough from that kind of mining, without going insane,
to be able to take on a player who has all the money, then it will have to be
rather lucrative. So then mining will often make more sense than playing the
main game. Even if it's fun and engaging, so not grinding in the usual sense,
it would be a single-player activity which distracts from the main game.

The advantage of using a competition or a lottery is that it can be not very
lucrative for a competitor on average, while still providing enough to whoever
wins that they can challenge a dominant player. But then you do have to have a

#13 Re: Main Forum » New "cheatproof" test server » 2017-02-18 10:14:25


Or maybe better actually: get rid of the minivaults, but have the list give
*no* information about the value or contents of a house. Then every house is a
potential competition winner, so worth a look.

#14 Re: Main Forum » New "cheatproof" test server » 2017-02-18 10:08:30


Hmm... I was thinking of the competitions as a means of kicking the system
away from the pathological fixed points, rather than as a replacement for the

On a theoretical level, I agree that they suffice on their own to fix the
problems we identified. But if they're really the only way for a new spawn to
get in to the game, they're going to be a major focus of play. One severe
problem with that is that an actually new player who isn't familiar with the
game is unlikely to win a competition, so the competitions will form the
entirety of their play experience until they learn the game sufficiently well
to compete with the experts. During that time they're seeing nothing of the
game TCD is meant to be, and I doubt the competitions would be engaging enough
for them to stick with it long enough ever to see the real game.

So no, I think it's still important that new players can get money from Main
Game sources - which means toolless robberies and luring antes. Competition
wins have to be reasonably large if they're to do the job of kicking the
system away from a "won" state, so they're not likely to help much with the
problem of making starting houses seem worth robbing. So if the minivaults
were ever necessary, I think they still are.

#15 Re: Main Forum » New "cheatproof" test server » 2017-02-18 06:30:40


Developing a CAPTCHA of the traditional kind, one based on current holes in
machine perception, seems increasingly difficult as those holes are filled.
Anything we came up with would probably need replacing in a few years.

Optimisation problems, on the other hand, should remain hard forever. By using
the same problem domain as the main game, we make sure that if someone does
manage to develop an algorithm to break it, then also the main game is broken
- and then we can stop worrying altogether. Alternatively, general AI might
well get to the point that it's better at this sort of thing than humans, but
then hopefully it'll also enjoy the game as much as humans!

So. It looks like we actually have a complete solution without any known
holes! To summarise the changes required:

* locked doors
* "mini-vaults" (TODO: proper thematicisation);
* competitions;
* reduction of loot value on a successful robbery;
* multiple simultaneous robbery checkouts.

Some details not yet decided:

Should minivaults be implemented just like vaults, so you start with one in
the initial layout and must always place it somewhere? I think yes, for
neatness and to teach the player about it from the start. It can start by the

If you enter a house as a robber, i.e. with a lockpick, should you still be
able to rob the minivault? Or should robbing the main vault also loot the
minivault? I think no to both, because I like the idea of having a pure-puzzle
element to a house which can only be robbed toollessly, and because it gives
players a secondary backup in addition to the wife to help them keep afloat
after a robbery.

Do we still need reserves? I think so, for the same reasons as always - the
competitions don't change the situation that much. Can we make reserves be
exactly what goes in the minivault, as I suggested in another post? Actually
no, as reserves are meant to encourage putting up an ante.

How exactly should the reduction of loot value work? To recall, this had two
purposes: to punish using a sock puppet to clear out your minivault, and to
punish rapidly cycling all loot between two accounts, using simultaneous
robbery to take it from under the nose of a genuine robber. For the former a
big penalty is needed, but only a small one is needed for the latter. So
something like 20% for the minivault and 2% for the main vault should do it.
Or if it's decided that the minivault is robbed along with the main vault,
just 20% for the minivault.

How does adding competitions as a money source affect the economy design? Can
we use it in place of rescaling to handle deflation due to the various sinks?
Having the prize pool be filled directly from the sinks is no good, because a
purpose of the competitions is to shake up what would be a static game with no
activity, as in the case that one player has all the money and just sits on
it. That doesn't rule out having the pool be filled first from the sinks, then
adding extra only when needed. But there are so many sinks in the course of
the main game that I fear the pool would grow too big, and the competition
would end up overshadowing the main game. So I'm thinking that rescaling
to a fixed global value should stay. The prize pool should be part of that
calculation, fixing the problem of 'winning' - it's then never true that you
and your puppets have all the money, because there's always some in the prize
pool, so sinking money into building and tools always comes at a cost.

That still leaves the question of how to automatically vary the size of the
economy to cope with fluctuations in the number of players. Something based on
the amount of money disappearing into sinks each time period could work as a
non-abusable proxy for how much money is needed in the economy. We can
estimate what a healthy economy looks like - maybe that 20% of the money goes
into sinks each day - and adjust the total money when it doesn't match,
something like:

    adjustmentRate = 0.3;
    newTotal = max (minTotal,
        oldTotal * (1 - adjustmentRate*(0.2 - sunk/oldTotal)));


Finally, there's still some room for abuse in the checkout system. You can
prevent someone editing by constantly robbing them, and you can camp inside
your house, keeping an edit session alive and never letting it be robbed.
These problems have always been there, and were sometimes annoying but never a
huge problem. Simultaneous robberies do make the first problem worse, though.
I'm sure they can be fixed without serious changes to the design, though I'm
not sure what's best. Maybe just a queueing system which gives priority to the
house owner, and a (lengthy) time-limit on editing combined with a way to save
half-finished designs (which I think Frosty may have implemented).

Then, I think that's it! Will it work? Will anyone actually play it?

#16 Re: Main Forum » New "cheatproof" test server » 2017-02-17 12:52:56


Using visual CAPTCHAs is a bad idea actually, it seems they're not that hard
to break these days. Maybe better than a lottery would be a competition: each
time period, a house is generated, and is freely entered by all. The aim is to
get to the vault, spending as little on tools as possible and, as a
tie-breaker, using as few moves as possible. An unlimited supply of tools is
provided for the occasion. Maybe blueprints are too. There's no immediate
reward for getting to the vault, but whoever has the "high score" at the end
of the time period wins the current prize pool.

EDIT: because there's no other way to do it which doesn't benefit
sockpupeteers, in the event of a tie (on both tool cost and moves), *no-one*
wins and the prize rolls over to the next competition.

Since it's ok for tools to be required, the house generation can be pretty
random. One way would be to use an old player house design as a base, then add
some random noise. If done right, the optimisation problem should be too hard
to brute-force.

It's not really thematic to have a competition like this, which suggests an
organised group of robbers... but maybe that shouldn't be so much of a

#17 Re: Main Forum » New "cheatproof" test server » 2017-02-17 00:47:28


Well, they get some loot which might be enough to buy a lockpick.

Another thing: this system actually fits really nicely with reserves: the
reserve can precisely be the petty cash you have to leave on your

So the remaining problem is the problem of victory, i.e. the case that one
player has all the money. That's how the server starts off, and it might
return to that state occasionally. I wrote earlier in this thread about
"retiring" as a solution to this, and I still don't see anything better.

But that doesn't handle the case of a winner-troll, who actively wants to keep
the system broken - they can do that by refusing to declare that they've won,
using sock puppets to keep the petty cash cleared out from their rich
accounts, and maintaining an illusion of activity to prevent any system which
might try to automatically detect deadlock.

I don't know... do you think this would be a serious problem in practice? It
would need someone to be good at TCD, and yet to be an arse. Far from
impossible, I suppose...

Maybe this does still need one little new mechanism. Any thoughts? I feel
we're close to a complete solution...

Only thing I can think of is to raffle off a small chunk of seed cash each
time period, enough for some basic tools, with tickets bought by filling in a
CAPTCHA (or thematic equivalent, if possible). When the game's functioning
healthily, this would hopefully get little interest (and the prize can roll
over), but it could act as a safety-valve for when it isn't.

EDIT: I think this has to be the best solution. It could entirely replace the
idea of "retiring", and of "abandoned houses". I can imagine it being made
acceptably thematic: you manage to scrounge up enough change to buy a ticket
for the lottery, but you only have a chance of winning if you use your lucky
numbers. These are presented in CAPTCHA form, perhaps visually as images of
visual-recognition-defeatingly crumpled notes, or perhaps using something
along the lines of To disuade people wasting time on it,
you can be told how many tickets have already gone. Now even if someone ends
up with all the money, sooner or later there'll be lottery winners to compete

#18 Re: Main Forum » New "cheatproof" test server » 2017-02-16 16:36:18


Here's an idea. Allow robbers to enter houses without any tools. But only
allow them to explore a small part of the house, and to rob only a small
portion of the house's loot.

It could work like this. Have a new fairly cheap tile, a "locked door". Add
lockpicks as a new tool type, which transform a locked door into an ordinary
unlocked door, without using up the lockpicks item. This can replace the
backpack, although you still aren't allowed to take any other tools if you
don't take a lockpick. So you either go in as a "house guest" without any
tools at all, or you go in as a tooled-up robber with at least a lockpick.

Now we introduce a mini-vault, to be optionally placed in addition to the main
vault. I'll call it the 'mantelpiece' for now, but feel free to suggest
something better. The idea is that it's somewhere you'd store some minor
valuables to be shown off to visitors. Or maybe it could just be a 'table',
being somewhere you tend to leave some petty cash. Anyway, this has two
functions. During a robbery, it acts like a vault, and stores a proportion of
the house's loot - say 10%, with the vault and wife then getting 45% a piece.
During self-test, it's how you unlock any locked doors in the house: let's say
it's where you leave the key, so if you walk onto it during a self-test you
pick up a 'key' tool which acts just like a lockpick.

So you don't have to place this mini-vault at all, but then you're allowing
anyone to try to spam-rob their way to your main vault. You can prevent this
by placing locked doors, which can only be passed by those putting up an ante
by bringing a lockpick. But then you have to place a mini-vault, which will be
accessible by "house guests", and as part of the self-test you'll have to
prove that it is indeed toollessly accessible. You're motivated to make this
difficult. So now poor players can try to get a bit of cash by robbing the
rich while posing as friendly neighbours, with this being a player-generated

One final necessary adjustment: so far, this scheme seems to be open to the
same kind of abuse we've been worrying about - players can just use their
sock-puppet accounts to clear out the mini-vault as soon as they check their
house in, so no-one else will get a chance. But if we make it that a
proportion of the mini-vault cash is just destroyed when it's robbed, then
players are better off trying to protect it from being stolen at all.

Sadly, this still doesn't quite work for N=2. If you're the only one with
money, you don't care about some of it being destroyed. Reserves mean that a
little petty cash will have to be available from one of your houses, but not
enough for the poor player to get going. But it seems to works for N >= 3, and
really I think that's good enough.

#19 Re: Main Forum » New "cheatproof" test server » 2017-02-16 14:35:53


The ante isn't just a technical means to an end, by the way - it's there to replace permadeath, to make sure there's still a game mechanic to punish failure. I see it that as an essential part of the game. I expected you to too!

#20 Re: Main Forum » New "cheatproof" test server » 2017-02-16 14:22:35


Oh dear. Good point. The only way I see to deal with that is to allow
simultaneous robbery checkouts, with only the first successful robbery
counting. That's not quite enough, because you could automatedly shuffle your
money between two accounts every few minutes. But that could be dealt with by
having some proportion of the loot from a successful robbery be destroyed
(autoselling tools if necessary). That should work, right?

Got any more nasty attacks like that?

#21 Re: Main Forum » New "cheatproof" test server » 2017-02-16 00:44:09


System-wide chills sound nice, but there's a problem: it's to your benefit to
have your house chilled, so you're going to send your sock puppet to die in
your house to trigger the chill. I don't see a way to deal with that.

#22 Re: Main Forum » New "cheatproof" test server » 2017-02-15 14:45:01


You're right that I settled for a system which I couldn't see wouldn't work,
rather than a system which I could see would work. I continue to expect it
would work - but it's a complicated dynamical system involving human
psychology, so I think hoping for a watertight proof that it would work is
over-optimistic. As for your argument that it couldn't work - I agree it's a
valid argument under the common game-theoretic assumption of recursive
rationality (or whatever it's called), i.e. that every player is rational and
that every player assumes every player is rational and so on. The problem is
that this assumption isn't actually true!

But I agree that it would be better to have a system which works even with
that assumption, because it's almost true and it's hard to quantify how false
it is. And it would certainly be nice to have a system which doesn't grind to
a halt when there are too few players, if only because it makes it a bit
closer to plausible that it might actually accrue some players!

So here are some thoughts on incorporating your 'seed' idea.

The aim is to ensure that players who might otherwise be locked out from the
main multiplayer game have a way to get into it. It must not be open to
sock-puppet abuse. Theoretically, an opportunity for non-automatable grinding
would work - at the most depressing end of the scale, that could just be
completing CAPTCHAs. We can aim to make it less grindy.

We can imagine developing a map-generation algorithm which would produce
genuinely interesting and challenging houses, which players won't be able to
develop an algorithm to automatically solve. But at least some of the
generated houses must be solvable toollessly, else bankrupt players will be
stuck. So we have to develop an algorithm which will generate a solvable
house, with the generated houses being such that finding a solution given the
house is computationally difficult. Moreover, we want the results to be fun
for a human to solve, so just embedding a large instance of 3-SAT or similar
is out. Meanwhile, we don't want them to be too difficult for humans to solve,
since this is the first part of the game a newbie will engage with. This
sounds like a really hard problem!

An obvious alternative is to make use of old player-designed houses. I think
Frosty's server did this, with a stock of designs (collected from
castledraft?) used by computer-controlled players. But then we have the
problem that players (and their bots) could eventally become familiar with the

An alternative which doesn't work is to have automated *robbers*, who are
programmed to irrationally try to rob houses they expect to be empty. That
would have the advantage of making players do something useful for their seed
cash - namely designing houses complicated enough that the computer robber
ends up dying in them. But the problem is that any one sufficiently
complicated design could be replicated over a number of puppet accounts, and
then the system ends up being little better than giving out salaries.

I suppose another possibility would be to sell seed cash for real-world
money... but that would be pay-to-win, and horrible.

Here's an amusing idea: players could have to start off as jobbing painters,
making pixel art for moneyed players to buy. If these replace (most of) the
existing paintings, and new ones expire after some time, and rich players are
forced to buy paintings by a house price cap tied to the number of paintings
they own, I can almost imagine this working... but only almost. Could be a fun
supplement to any other solution, though.

Now I'm out of ideas. The only feasible reliable non-abusable system I can see
is to use CAPTCHAs, which would be awful. Help?

#23 Re: Main Forum » New "cheatproof" test server » 2017-02-13 00:51:10


> Once it "gets going," with many players, that problem will persist.  When
> the N+1 player joins, people willhave no rational reason to rob them, so
> that player will be frozen out of the economy.

Yes, it's entirely crucial that when players see a $2000ish house in the list
they haven't seen before, they have reason to think it might contain enough
money to be worth robbing. I tried to explain how reserves are meant to
achieve this. You seem to be saying it won't work, but I don't see why.

Certainly it won't work with only two players. When a third one joins,
theoretically it could work and they'll get into the game, but it's unlikely.
With sufficiently large numbers I believe it would work; I don't know how
large is sufficiently large, though.

To clarify things, here's the theoretical way it could work when a third
player Bob joins Zed and JR who are in the middle of a pitched robbing war,
with both (due to well-protected wives) having money in the bank. I see the
new name on the list, and think 'pfft, clearly nothing there'. So I go on a
robbing run against you, or work on my house, or even desert the game in
favour of real life for a bit. Then I come back, see the same name on the
list, and think as follows: "Pfft, clearly nothing there. Unless JR went in
there and died, but why would JR do that when there was clearly nothing there?
Unless JR thought that I'd been in, but why would I do that when there was
clearly nothing there? Unless I went in because I thought JR might, but why
would JR think that I thought that JR thought that it might be worth going in
when there was clearly nothing there? Unless... hold on, this logic is getting
a bit complicated. Do I really trust JR to think through this logic
accurately? Hmm hold on, without that trust, it isn't logical at all... does
*JR* really trust *me* to think that logically? When it's only logical under
assumptions which are seeming rapidly untenable? OK, I'm only risking $500,
I'll go in and have a look. Pfft, that commit trap doesn't work, look I can
just... oh right, yeah. Oops."

#24 Re: Main Forum » New "cheatproof" test server » 2017-02-12 15:39:15


Well the problem you're identifying there is that having one player with all
the money is a fixed point of the dynamical system - that state will persist
until it's given a kick by an external force. That can be done hackily through
gifting, or in a more principled way as with the 'abandoned houses' scheme.
But the interesting question is what happens once you've done that, and you
have (one way or another) got into a situation where the cash is distributed
among many players. When I'm considering whether the system works or not, it's
what happens then that I have in mind. Part of it "working" is that the system
rarely gets trapped again in a dead fixed point state - probably more could be
done to discourage that, but still it will happen sometimes - hence the need
for some automated system to kick it back out.

#25 Re: Main Forum » New "cheatproof" test server » 2017-02-12 14:42:19


There should be no "gifting". That wasn't an intended part of the system, that
was just a hack to get it up and running. There is the problem that this could
be required more than once, due to fluctuations in activity or to "winning".
The abandoned/retired houses scheme described above is meant to replace the
need for admin involvement in such cases - if the server goes through a
dormant phase and then some people start playing again, they'll be able to get
cash by toollessly robbing the abandoned houses left from the last period of
activity. So actually that's a bit like your "seed" houses, but

Being able to explore a house without wagering anything is just as bad as
being able to rob it - you send in your sock puppet(s) to find the route to
the vault, then go in with your real account to clear it out.

I don't see your inductive argument - could you explain the step from n to n+1?

Board footer

Powered by FluxBB 1.5.8