PokerChipRace multiplayer challenge discussion

What would you call “dead droplets” if it’s not the neutral droplets ?

The droplets that have bean eaten and that are no longer in the game.

Every time a chip accelerates, the chip will expel a fifteenth (1/15) of its surface area and will shrink in diameter.

tick 1: entity 1: radius 25.0
tick 2: entity 1: radius 24.152295

24.152295 / 25 doesn’t look like 1/15

1/15 of the mass.
Mass is proportional to the radius squared.
You’re missing a square root somewhere :slightly_smiling:

1 Like

@MadKnight & @pb4
to improve performance, no need to calculate a square root for each chip : new radius = current radius * 0.96609178

where 0.96609178 = sqr(14/15)

Yay! I’ve just been promoted to bronze. I’m so happy I had to share! :joy:

I haven’t submitted any code since last year. (here’s the date for reference)

That code was actually my first submission. (here’s my submission history. Dates not a year ago are the league system autoresubmitting my stuff)

And I made it to bronze already!!!

I’m not going to add a screenshot of my code. That would be cheating. Probably. Or against the rules in some way. They always find a way to bend the rules to make it against them.

I’m only going to paste my first line, that’s not really code, it’s a simple comment.

Yup. I’m in bronze with the default code (and a custom comment.) Go me! and thanks CG!!!

2 Likes

I fixed one small global variable bug in my game simulation code and jumped two leagues. That was a pretty great feeling.

Note to self, don’t use global variables that aren’t actually global!

1 Like

hey,would you tell me how to set the seed info into the “test” manually??

1 Like

On the left: SETTINGS -> mode:EXPERT
then you have two tabs below your code: players and options. Go to options/manual and copy-paste that text.

However, the droplets are smaller than my own chip for that seed.

I just started this multi. My original intention was to write a very simple heuristics to get out of Wood 2. I made a bug, resulting I accidentaly always sent WAIT. To my amusement this bot overtook cca 1000 players, ending in middle of the full leaderboard (still in Wood 2 though).

Then I corrected the small bug and the bot started to play as intended - thus dropping by 200 places… :slight_smile:

PokerChipRace has a big design flaw. It’s very difficult to achieve a “good” move. “good” as in “good enough to not destroy yourself”. Hypersonic got the same design flaw (but in a less harmful way).

It’s an old puzzle so there’s no way CG will change it anyway.

But it’s a good “anti-example” for puzzles creators :smiley:

bonjour, je suis en ligue bronze. J’aimerais savoir comment récupérer le X ou Y d’un “playerId = 0” (un de mes pions) car avec le tableau d’entité on pouvais simplement faire _entities[0].getX mais avec le playerId je ne trouve pas de solution.

cordialement

hello, I am in bronze league. I would like to know how to get the X or Y of a “playerId = 0” (one of my pawns) because with the entity array we could simply do _entities[0].getX but with the playerId I can’t find any solution.

Cordially

I don’t know which language you are using, but based on the stub (in C#) :

int playerId = int.Parse(Console.ReadLine()); // your id (0 to 4)
...
int entityCount = int.Parse(Console.ReadLine()); // The total number of entities on the table, including your chips
for (int i = 0; i < entityCount; i++)
{
  string[] inputs = Console.ReadLine().Split(' ');
  int player = int.Parse(inputs[1]); // The owner of this entity (-1 for neutral droplets)
  float x = float.Parse(inputs[3]); // the X coordinate (0 to 799)
  float y = float.Parse(inputs[4]); // the Y coordinate (0 to 514)
}

So using a loop and check if the playerId is equal to player would do the job.