Tit for Tat avoided some of the barriers that other entrants had, like:. All in all, these barriers to cooperation are largely opposites of the kinds of characteristics that drive cooperation. Some interesting learnings show up if you randomize the different programs and run a sort of evolutionary game with them. The programs that get the most points collectively every few rounds get to replicate, and those who lose consistently die out. There were some challenges, however. However, if you introduced new programs in clusters, so that at least some of their interactions would be with like programs, it was possible for programs like Tit for Tat to not only get a foothold, but also to start to eradicate All D.
This works, because the benefits of both programs collaborating far outweigh the benefits for both programs defecting. Tit for Tat does so much better against itself that it ends up with a point surplus, even if it has to give up one move to All D. The first round, All D will defect, and Tit for Tat will cooperate, giving it a disadvantage — however, a round with two Tit for Tat programs handily makes up for this small difference.
Perhaps my greatest concern with the exercise and the learnings is their applicability to our lives as humans. One of the key driving factors for this game is that the cooperative payoff is collectively larger than one defection and one cooperation or both sides defecting.
Effectively, this is a built-in bias that cooperation is the winning move — when you can get both parties to agree. The second concern is that the game presumes that the participants will meet again. In fact, retaining the probability that the participants will meet again is absolutely key to the system working.
As mentioned earlier, this caused Axelrod to modify the game to not have a fixed endpoint, since knowing the end caused defections at the end. I know that they should. There are better payoffs to take advantage of them. Another inherent requirement is that the future not be discounted too much. However, more than that we learned in Thinking, Fast and Slow that we discount things in the future more than we should.
Whatever true value we get in the future has to outweigh our cognitive bias against it. This leads to the future not being seen as more valuable — and that can be problematic. Some interactions are more important than others. The second person gets to decide whether both get the split — or neither.
Seen in the context of The Evolution of Cooperation , this makes sense. Accountability is the proposed solution. So evolution has primed us to weed out those folks who are social loafers.
Review of Isn’t it Obvious, written by Eliyahu Goldratt
Finding that line seems to be one of the things that happens in The Evolution of Cooperation. Tit for Tat As it turns out, my program was beat rather handily by some others in the competition, but it was fun anyway. Characteristics for Cooperation Axelrod took his findings from running these competitions with many different programs and generalized a set of principles that defined the winners for the competition he established.
He asserts that, to win this game, the programs needed to be: Nice — The nice programs won over not-so-nice programs Provokable — The program needed to respond quickly when the opponent would defect. Forgiving — Once the other program started to cooperate, the program should start to cooperate too. Clear — The program should make its behavior clear enough that the opponent would be able to understand the behavior and learn to work towards mutual benefit.
Tit for Tat avoided some of the barriers that other entrants had, like: Being Envious — By being worried about your opponent in the current challenge, programs were less effective.
The Armchair Economist-Revised Edition
First to Defect — Programs that were the first to defect tended to do less well. Additional Learnings Some interesting learnings show up if you randomize the different programs and run a sort of evolutionary game with them.
Applicability to Life Perhaps my greatest concern with the exercise and the learnings is their applicability to our lives as humans. Cooperative Ratios One of the key driving factors for this game is that the cooperative payoff is collectively larger than one defection and one cooperation or both sides defecting.
I wish I understood why the low-level read calls never return more than 16 kB. It feels like it would be more efficient for our needs if the reads would pause block until the desired amount of data is available. Is it possible that running the driver in interrupt mode would solve this problem? Perhaps polling mode means non-blocking reads?
Isn't It Obvious (Revised Edition)
You claimed that interrupt mode would be inefficient at high rates, but perhaps that's only true if you try to make small reads? We'll discuss in person The commit link I provided above for C is not pure C but used C constructs for the file read copied from Xilinx. Thus as you found out, it behaves the same. It doesn't have to be pure C to show that. So that seems like a waste of time. Buffered versus Unbuffered, I guess that shows my lack of knowledge in programming, which might be why I have been asking for help for a long time.
If it is determined to be a problem later on then we can revisit this buffered versus unbuffered read method.
For the buffered read call in C, can you go and make a second read after the first without closing and opening the file? Because if you can't this is pretty much a done deal here. Do you want to switch driver operation rmod and insmod the driver? I don't. You can try interrupt mode on the driver, but that is not how we will need to operate.
Just run. I did try switching the driver into interrupt mode. It failed. In short, the low-level calls still returned only 16 kB, while the high level calls would return data only once calls after the first returned 0 bytes of new data. I don't understand this, but I know it's the opposite of progress, and so I returned the driver to polling mode.
To answer your question: yes. In C, whether buffered or unbuffered, reads could be done 8 times in a row and always get data without closing the file. Well, that's true only in polling mode. When the driver was in interrupt mode only the first read would return data, as mentioned above. Is there any chance that your previous troubles with having to close then re-open the device file occurred in interrupt mode? Here's my plan: write the Golang acquire program to use buffered IO and see what happens.
If it appears to work well, then next we'll want to check carefully for dropped data. Buffered IO in golang buffo. Reader did not solve the problem. It's designed to let multiple small reads from go be unpacked from a single underlying system call. We wanted the opposite: small reads from multiple system calls to be bundled into one Go read. And even if it did what we want, it would surely be subject to interruption by the garbage collector, so I don't think this was a promising path in the first place.
Looks like we need a C program to run a tight loop no garbage collector! It's a persistent memory-resident pipe it has a place in the filesystem but otherwise has no relationship with the drive that it lives on. One problem for us is that you can't open a pipe for writing unless it has one or more readers.
Pipes don't have those semantics, however. One approach suggested on stack exchange is to have the C program open the pipe for write and read. Then you don't actually read from that end. This behavior is apparently undefined by Posix but works on Linux.