# Agents can have priori knowledge of expected game length

See original GitHub issueEmphasis on *expected*.

Since the game length is defined to be `int(200-40*np.log(random.random()))`

, which has an expected value of 240, agents can make use of this in undesirable (?) ways. I.e. use a probabilistic approach to try to deceive the opponent at the end of the game with no consequences.

I *think* this is an unintended issue since

- The whole point of the random game length was to prevent this behavior
- It is not in the “spirit” of the iterated prisoner’s dilemma

### Issue Analytics

- State:
- Created 2 years ago
- Comments:16 (1 by maintainers)

#### Top Results From Across the Web

CS 165A Discussion 1 - UCSB Computer Science

The agent's prior knowledge of the environment. • The actions that the agent can perform. • The agent's percept sequence to date.

Read more >Aumann's agreement theorem - Wikipedia

The theorem concerns agents who share a common prior and update their probabilistic beliefs by Bayes' rule. It states that if the probabilistic...

Read more >Priori Knowledge - an overview | ScienceDirect Topics

One is that mathematics can claim to give a priori knowledge of (universally applicable to) objects of possible experience because it is the...

Read more >The Role of A-priori Information in Networks of Rational Agents ...

The a-priori knowledge of n is formalized as a Bayesian setting where at the beginning of the algorithm agents only know a prior...

Read more >The Role of A-priori Information in Networks of Rational Agents

However, what if agents have partial knowledge about n? We ... The problems we examine here can be solved in the game-theoretic setting...

Read more >#### Top Related Medium Post

No results found

#### Top Related StackOverflow Question

No results found

#### Troubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.

Start Free#### Top Related Reddit Thread

No results found

#### Top Related Hackernoon Post

No results found

#### Top Related Tweet

No results found

#### Top Related Dev.to Post

No results found

#### Top Related Hashnode Post

No results found

## Top GitHub Comments

It also has a max value of

`1765`

due to random.random() returning a float with limited decimals.`random.random()`

also uses a deterministic number generator and a single instance of the seed class, so you can actually figure out the number of games based off the calls to the underlying class.But that would fall under the cheating and get your code kicked out?

~~There’s no such thing, really, as “expected game length” in this tournament. The distribution of possible game lengths is a log curve going from 200 to infinity. Finding the average value of that kind of curve is meaningless.~~In fact, I ran a Monte-Carlo simulation for the odds of the game ending at a given turn. After turn 200, it goes from 0 to 2.5% and stays there. This is exactly as carykh says: a low but equal probability that the game will end.

The samples get too sparse after 500 rounds give or take, but the odds of reaching 500 is 0.056% anyway. If anyone is curious or wants to check me (please correct me if you see something), here’s the code: