-
Notifications
You must be signed in to change notification settings - Fork 6
Docs/strategy analysis #8
base: master
Are you sure you want to change the base?
Conversation
analysis/prelim_strategy_analysis.md
Outdated
|
||
**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 |
There was a problem hiding this comment.
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)
analysis/prelim_strategy_analysis.md
Outdated
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
analysis/prelim_strategy_analysis.md
Outdated
|
||
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 \\ |
There was a problem hiding this comment.
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
Feel free to ignore me on those, though
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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 \
;)
There was a problem hiding this comment.
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.
analysis/prelim_strategy_analysis.md
Outdated
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
analysis/prelim_strategy_analysis.md
Outdated
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
analysis/prelim_strategy_analysis.md
Outdated
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* |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
analysis/prelim_strategy_analysis.md
Outdated
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'? |
There was a problem hiding this comment.
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.
Looks great. Excited to see it evolve. |
430d9e3
to
40dd00c
Compare
@5und3vi1 |
Note: I noticed an issue in my analysis the other day. The next push will contain a substantial update. |
e27ad93
to
025a345
Compare
a90537c
to
c8ad0bc
Compare
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!
c8ad0bc
to
1124120
Compare
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.
@dirkmc did you ever get to see this? Is it still worth considering to get merged? Perhaps to ipfs/specs? |
WIP @miyazono @diasdavid