Gameplay

Here is an overview of how the game is played.

Each player has a pet dog.

Each player has a pet dog

Dog has a set of skill points and a breed.

Pitbull Alice

At the beginning player is given 10 skill points to spend however he wants.

Nobody can see how the points were distributed.

Alice spent her points

Players set up battles between one another for ether.

Alice received fight request from Bob. Notice she doesn’t see how he spent his points last time. However sum of all skill points is public.

Alice accepted the fight request. Bob doesn’t see her last spend too.

When both parties agreed to fight, their skill points are fully revealed.

Winner takes all the ether and gets additional skill points to spend. Her points get also semi-randomly increased.

Alice won!

Loser gets punished with randomly decreased skill points. However, he also gets free points he must spend before his next battle.

Bob lost. His skill points got randomly decremented

This random increase and decrease of skill points, you’ll see later, is very important. They are not fully random, but designed so they tend to make dog’s skill points more uniformly distributed.

Calculating odds. Why Alice won?

First of all, the outcome of battles is not deterministic but probabilistic. So you can’t say for sure whether Alice will or will not win beforehand, you may only tell the probability of this event.

The odds are calculated based on both opponents’ skill points and their breeds. Players also have to fully reveal their skill points before the battle (so Bob bids, Alice bids and reveals, Bob reveals. But that is a topic for another discussion). As soon as this happend, process goes as follows:

Based on dogs’ skills calculate an integer we call k

Generate a random number X from 0 to 200

If X is less than (100+k) — Alice wins, else — Bob wins.

Yes, I know 100 and 200 sound arbitrary, and a lot of magic constants coming up. I’ll use them for your better understanding of things, where real values may and will differ.

For now try to understand that if Alice is stronger — k is positive, say 50, then Bob only wins if 150<X<200 and Alice wins if 0<X<150. Similarly, if Bob is stronger — k is negative, say -50, then Alice only wins if 0<X<50 and Bob wins if 50<X<200. This shouldn’t be hard.

Calculating k

From what has just been discussed, k should be regarded as some measure of advantage of one opponent over the other. Before we get into it, the formula involves not only skill points of both dogs, but also their breeds, so lets clear out how breeds impact dogs.

Breed is obviously something that can not be changed throughout pet’s life and it defines skills priority. For example, pitbull’s primary skill is agility, secondary is strength and tertiary is intelligence. There are 3 skills, so 6 permutations, so there are 6 breeds. Lets represent breeds in such notation:

Notation for breeds

Pitbull will be represented as [2,1,3]. Bob is doberman so his breed represented as [3,2,1].

Now we can calculate k, and we do it like so:

Looks complicated but it’s really simple. Let me explain:

Here A is Alice and B is Bob.

We do computations for each skill, then sum all 3 partial results to get k.

Inside the sum sign you see two expressions

First is square root of the difference of the skill. And p is just a workaround to avoid minuses under square roots. It works like sqrt(-4) = -2

is just a workaround to avoid minuses under square roots. It works like sqrt(-4) = -2 Second one deals with breeds. We multiply difference of skill and difference of skill priority.

I should point out though, to really use this formula you should cram in a couple constants here and there in order for it to co-operate with other numbers, like already mentioned 200, how many free points are given to the winner, maybe increase importance of breeds, throw in additional linear dependace alongside nonlinear, so on.

What interesting can we say about this formula:

For similar dogs k = 0

Because of the square root there, generally speaking, smaller advanage in 2 skills beats bigger advantage in 1 skill.

So (10,10,7) is better than (9,9,9).

So (10,10,7) is better than (9,9,9). Breeds matter more when skills differ more. And if skill points are the same, breeds don’t matter at all.

Skills margin limit

This tiny detail very well may be the most important aspect of the game logic as it ties everything up beautifully together. It can be stated like this:

Any of one’s skills can not differ from any of the other two by more than X points

For example, one can not always spend all points solely on agility. If we set this skills margin limit to, say, 10, there can not be a dog with skill points (100,3,1), but (100,90,90) is OK.

Firstly this is important because otherwise it would be reasonable to increase only primary skill.

Futhermore having this limit gives us a finite array of possible dogs, thus analyze this array and the game’s logic in general.

Analysis

Get ready for the interesting part. We have a set of simple rules from which quite complex system arises. Lets study it and find out if it is worth playing!

Studiyng the field

In the previous paragraph I said that skills margin limit(“SML” from now on) gives us a finite array of possible dogs (“the field” from now on). Well it’s actually THE same array for every possible skill points sum, so we can uniquely identify any dog with just two numbers: it’s position in this array and sum of all it’s skill points. That is because we can calculate what is the minimum and the maximum points a dog with particular skill points sum(“SUM” from now on) can have.

Say SML is 10 and this minimum is 30, than obviously a dog reaches this minimum if and only if it has a skill configuration (30,40,40) and the SUM in this example is 110. Formally:

Minimum and maximum points dog’s skill might have given sum of all 3 skills and skills margin limit

So for any dog we can subtract this minimum (relevant to it’s SUM) from every skill and get it’s corresponding point in the field. And for the purposes of further studying the field breeds don’t really matter anymore. Instead of specifying breeds we can say how much points it’s primary skill has, how much secondary and how much tertiary (primary, secondary, tertiary), e.g. (10,12,14).

In this configuration, if SML is 10 we have 111 different dogs in the field. And if we don’t do that last trick with breeds we get 666 dogs (finally illuminati is confirmed).

Okay. Next logical question to ask would be: what configuration of skills is the best in the field? what is the distribution of coolness in the field in general?

To answer that we need to define the concept of coolness. There are many options like sum up all k the dog has with every other dog in the field or it’s avarage k or it’s median. I propose to count how many dogs does the dog beat in the field (where probability to win is more than 50%). And lets also divide this number by size of the field.

Visualizing coolness, we get this lovely horse saddle shape.

Coolness of dogs in the field. SML = 10

There are 5 interesting points here:

Two high tips. One that is higher than the other (and the heighest) is the point (10,10,0). The other is a little lower and corresponds to (6, 2, 12) non-trivial isn’t it?

Middle part, where coolness is around 0, corresponds to equally distributed skills like (7,6,7).

Two lower tips. The lowest is (13, 3, 4) amazing right? And a little higher is (1, 11, 8).

These “second” tips, both low and high, emerge from something very peculiar happening. Actually there are 2 main reasons why a dog can be cool. I’ll leave it for true math maniacs to think about. Important thing about this picture is:

For every dog there exists sufficient amount of both weaker opponents and stronger opponents with the same SUM

Again, coolness here is not a probability for a dog to win. It’s the measure of how many dogs is the dog better than. Hang on, you say, everyone has somebody weaker and somebody stronger, how can this be possible? The simple explanation would be that it goes in circles. Like rock beats scissors, scissors cut paper and paper covers rock. Of course it’s more complicated, but general idea is the same.

*Note. We don’t do the following in the game. Instead we normalize the points before calculating k. So only the plots like shown before matter in the game

And what if we let players with different SUMs to battle?

Coolness of dogs with different SUMs. Green — SUM-1, orange — SUM, blue — SUM+1

See, nothing scary happend and even the saddle shape persisted. What it tells me, as a developer, though, is that here we need to stretch the shape upwards so one would have sense in battling opponents with SUM at least 5 points bigger than own. OR (this is what we are doing in the game) normalize the points before calculating k.

Discussing gameplay and possible strategies

One might imagine changing skill points, both increasing and decreasing, as just switching to other point in the field. Than what is a successful way of playing?

Remember that you can not see how your opponent spent his available points last time. So you can’t see his current position in the field. But you can see his previous one. In fact you see complete history of how he changed his points and what opponents did he encounter. From this you might work out his possible game strategy.

Those who think that it’s all about being on the tips of the saddle are terribly wrong. It’s very easy to spot dogs like this and basically take their ether.

Remember that uncontrolled change of skill points for both opponents after the battle that tends to uniform their distribution of skills? It drags them towards the center of the saddle. And the point you get to after this change isn’t a secret. The question is where you’d go next. The amount of points to spend manually a player gets should be sufficient to reach almost any point from the center of the saddle. I say “almost” because it gets more interesting if after the random uniforming your options for where to go would always be slightly different, don’t you think?

I feel like this is not the time or place to define and analyze the concept of point value in terms of what coolness could it possibly offer in the long term.

The point is that players who want to win should really study their opponent.

Another thing to mention would be to wisely plan your bidding strategy. Consistent strategy of choosing how much money to put down on what fight is also one of the key factors of success.

Conclusions

The things claimed in the beginning has been proven as far as just-for-fun Medium articles should go.

If you have any questions, or maybe you have found a fatal flaw in our system and want to tell us about it (or wait till the game is ready and exploit it) feel free to join our Telegram chat.

https://dogsonchain.com

https://telegram.me/DogsOnChain