Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
spimta
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
Show HN: Hindley-Milner, pattern matching, and other Haskell features in Python
(github.com)
3 points
by
spimta
11y ago
|
0 comments
2.
▲
by
spimta
11y ago
Echoing stonemetal, I would recommend seeing if you can refactor so that you can keep your pure function as-is, and then lift it into some monad that takes care of the logging. The Writer monad can be a good way to do this elegantly.
3.
▲
by
spimta
12y ago
Ah, I see what you mean now. This was deliberate--I want simulation time to be a precious resource that bots have to spend wisely. You can burn 4 seconds on one simulation that is more likely to give you valuable information, but then it&#x
4.
▲
by
spimta
12y ago
I actually fixed the number of rounds on purpose--I figure the Nash equilibrium in the classical iterated PD isn't very relevant in this wildly different version of the game, and I want to see what kinds of strategies emerge with fixed
5.
▲
by
spimta
12y ago
When you call the time function, it will cut off the simulation once that 1/100th of a second limit is reached, no matter what happens inside the simulation. So even if your opponent simulates you or performs some expensive computation
6.
▲
by
spimta
12y ago
Yep, you're exactly right--I didn't actually add up the payoffs when I wrote that. You could potentially do better against tit-for-tat variants that have a certain chance of forgiving after a defection, but not against the naive,
7.
▲
Show HN: Prisoner's dilemma tournament with bots that can simulate each other
(github.com)
51 points
by
spimta
12y ago
|
18 comments