DEV Community

Cover image for Can your code survive 1.5 Billion rounds of digital betrayal? Submit your strategy!
Ferruscpp
Ferruscpp

Posted on

Can your code survive 1.5 Billion rounds of digital betrayal? Submit your strategy!

Crazy Start

I built N-Prisoner's Dilemma game engine in C++ and run a tournament to find out what strategy is the best? Write your strategy and fight with other players in this game theory battle.
When I decided to make this game I couldn't even imagine that my ThinkPad would be the place of the Ten minute war. 25 strategies fought in more than 0.5 Million of battles each has approximately 3000 rounds. I also created such a "genius" strategy which crashed my laptop, so I have to restart my ThinkPad two times. But I didn't stop and run Evolution Game where at the end survives only the strongest. I also asked AI to write 4 strategies and one of them got into the TOP-4.

Tournament On This Tuesday

Send me Your strategies, here ferrus.manus.cpp@proton.me.
Strategy must follow certain rules and I will accept it no later than 19:00 28.04.2026.
This is a weekly tournament, so stay tuned for new rounds!

How to Create Your Own Strategy

Make your strategy. It's pretty easy, then send it to my Email to keep it secret before Tournament.

#pragma once
#include "Ndilemma_game.h"

class your_nickname : public Player
{
protected:
public:
        using Player::Player;
    bool move(int move_cnt) override
    {
        return true;// or false;
    }

    void print(ostream& out) const override
    {
        out << "your_nickname number " << number + 1;
    }
};
Enter fullscreen mode Exit fullscreen mode

More Information About Project

GitHub: https://github.com/Ferruscpp/Ndilemma
Rules: https://github.com/Ferruscpp/Ndilemma/wiki/Rules
Email: ferrus.manus.cpp@proton.me
Medium: https://medium.com/@ferrus.manus.cpp

Note for non-C++ developers:

Even if you are not familiar with C++, the core logic of the tournament is based on simple mathematical strategies. You can describe your algorithm in the Discussions section, and someone from the community (or the maintainer) can help translate it into code!

Top comments (0)