Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Docs/strategy analysis #8

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Docs/strategy analysis #8

wants to merge 12 commits into from

Conversation

dgrisham
Copy link
Contributor


**TODO**: finish this intro. Might want to mention the paragraph below, but have
to be clear that the first section is more general than the specific case done
in the analysis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely this. I think it could use a sentence answering "Why is bitswap important?" and "What is bitswap?" The latter can probably be answered with the text you sent in the email:

Our system consists of N users (where N is large) in a decentralized file-sharing system. Each user is connected to a finite number of other users (their 'peers'), and each user has data that all of their peers want.

At each time step, every user decides whether to send data to all of their peers. If a peer Reciprocates, they split their bandwidth among each of their peers and send them data; if the user Defects, they do not send data to any of their peers. (A user must Reciprocate with all peers or Defect with all)

players took in the previous round -- in other words, the debt ratio only
considers the immediately preceding round, rather than all previous rounds.
We have a network \Network of $\abs{\Network}$ users. The terms *users*, *peers*
and *players* will be used somewhat interchangeably, depending on context. Each
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You use "users" and "players" interchangably, but I think it might be best to use "peers" only to describe "immediate peers" i.e. users/players connected by an edge.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, that's how I tried to use it throughout the paper. Maybe I'll make that distinction here as well.


A player has two possible actions: reciprocate ($R$) or defect ($D$). The
utility function for player $i$ at time $t$ $u_i^t$:

$$
u_i^t = \sum_{j \in \Nbhd{i}} \delta_{a_j^{t}R} S_j(d_{ji}, \mathbf{d}_j^{-i}) B
u_i^t = \sum_{j \in \Nbhd{i}} \delta_{a_j^{t}R}
S_j(d_{ji}^t, \mathbf{d}_j^{-i,t}) B
- \delta_{a_i^t R} B \\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a big fan of using / to add spaces or \cdot for clarity in alphabet-soup equations like this. Also a fan of /left( and /right). I'd probably factor out the $B$ as well
Feel free to ignore me on those, though

Copy link
Contributor Author

@dgrisham dgrisham Nov 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on what you mean by using / to add spaces? And regarding \cdot, are you saying that it might be useful to expand the series out to a few terms to make it more readable/understandable?

Edit: Also, regarding the $B$ factoring, I found it easier to think through the meaning of the equation without it factored. When it is factored and I try to think about the meaning of each term, I end up mentally distributing the $B$ back through to get a clearer understanding.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you use a forward slash with a space in math mode, it forces a space; makes it a bit easier to parse when reading. When I first looked at it, it took looking at the definitions below to understand where the boundary between terms even was.
And you a good point; I take back what I said about factoring out the $B$. Keep that as is. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see, okay I'll play with the spacing to make it less cluttered. Good suggestion, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to assume you meant \ ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I really like the result of all of that but maintainability just dropped heavily (I did spacing around operators and such too, so if we ever want to change any of this from \, to \ , for example...). I'll work on a slightly maintainable solution to this, but in the meantime I think the pdf looks better.

the entire repeated game. This means that the network topology is static as
well.

**TODO**: spacing after \Network\ within regular text is a bit too wide
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be able to fix this with a \, but you'd have to do it manually

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might just leave it as-is, seems to bother my eye in some places but not others. I'll address this later if necessary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd have left it, but I've done enough TeX to learn most of the manual adjustments one can make and figured I could at least save you the stackoverflow search.

of user $j$. This function considers the relative reputation of peer $i$ to
the rest of $j$'s peers, and returns a weight for peer $i$. This weight is
used to determine what proportion of $j$'s bandwidth to allocate to peer $i$
in round $t$.
- $B > 0$ is the (constant) amount of bandwidth that a user has to offer in a
given round. We make the simplifying assumption that the users are
homogeneous in this value, so they all have the same amount of bandwidth to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move this assumption up to the first paragraph, where you state the assumptions about the topology?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, the assumptions are sort of scattered around the paper. I'll coalesce those better.

user $j$. This function considers the relative reputation of peer $i$ to the
rest of $j$'s peers, and returns a weight for peer $i$. This weight is used
to determine what proportion of $j$'s bandwidth to give to peer $i$.
- $S_j(d_{ij}^t, \mathbf{d}_j^{-i,t}) \in \{0, 1\}$ is the *strategy function*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused by the \mathbf{d} term. It isn't very clear to me why it's bold, or why there's a -i in the superscript.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, I'll add an explanation of this. The meaning of \mathbf{d}_j is 'the vector of debt ratios stored by user j for all of its peers', and \mathbf{d}_j^{-i} means 'the vector of debt ratios stored by user j for all of its peers except user i'.

Funnily enough, I was very confused when I first saw that notation in papers and there was very little explanation as to the meaning haha. I almost carried through that same lack of explanation here, so thanks for pointing this out.

notation, or just $(a_1^t, a_2^t, ...)$)
- $\mathbf{a}^t = (a_i^t \mid \forall i \in (1, \abs{\Network}))$ is the
vector containing each player's actions in round $t$. **TODO**: better to
use $i$ to mean 'peer' rather than 'index of peer'?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using either is fine.

@miyazono
Copy link
Contributor

Looks great. Excited to see it evolve.

@dgrisham dgrisham force-pushed the docs/strategy_analysis branch from 430d9e3 to 40dd00c Compare November 29, 2017 20:53
@dgrisham
Copy link
Contributor Author

dgrisham commented Nov 30, 2017

@​5und3vi1​

@ipfs-inactive ipfs-inactive deleted a comment from 5und3vi1 Nov 30, 2017
@dgrisham
Copy link
Contributor Author

Note: I noticed an issue in my analysis the other day. The next push will contain a substantial update.

@dgrisham dgrisham force-pushed the docs/strategy_analysis branch 2 times, most recently from e27ad93 to 025a345 Compare January 31, 2018 22:02
@dgrisham dgrisham force-pushed the docs/strategy_analysis branch from a90537c to c8ad0bc Compare February 20, 2018 21:41
1.  In the previous version the reciprocation strategy did not consider the
    opponent's behavior in the previous round.
2.  The utility function was missing the leading (1 - epsilon) factor in all
    calculations.

Any of the mathematical analysis prior to this commit should be considered to be
incorrect and misleading.
-   Restructured model description.
-   Generalized cost value in utility function.
    -   New result: TFT an SPNE under certain conditions!
@dgrisham dgrisham force-pushed the docs/strategy_analysis branch from c8ad0bc to 1124120 Compare February 20, 2018 21:46
This is meant to make the initial analysis as simple as possible. However, it
is likely that the cost of providing resources when reciprocating should and
will be considered in work that extends this analysis.
@daviddias
Copy link
Contributor

@dirkmc did you ever get to see this? Is it still worth considering to get merged? Perhaps to ipfs/specs?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants