vacp2p / research

Thinking in code
MIT License
62 stars 4 forks source link

Analyze and express SWAP iterated prisoner's dilemma game as a Mealy Finite State Machine #58

Open oskarth opened 3 years ago

oskarth commented 3 years ago

Problem

Currently we have a basic hacky end-to-end PoC for SWAP accounting. We have specs that indicate how this can be analyzed as an iterated prisoner's dilemma. However, there are quite a lot of states and inputs that go into making decisions on what to do. Having a more formal model with rigor around this would make it easier to analyze, think about, spot flaws, bugs, and build on.

Suggested solution

We have a finite set of states, inputs and outputs w.r.t. the game being played for SWAP. List these more formally and make a basic FSM model through some means. Ideally it can be used directly in nim-waku, say, but it can also logically be ported over.

Details

Just a brain dump here in terms of states and inputs:

Start simple though, and leave more sophisticated/probabilistic models for later.

oskarth commented 3 years ago

I have some ideas for how to do this, but would need to dedicate more time to it. I think it'd be very useful to do though.