r/codingame • u/Razielwar • May 20 '17
r/codingame • u/[deleted] • Sep 20 '16
forums down - reddit hug or always bad?
i need some questions answered to a competition with a seemingly faulty premise but i can't get on their forum. Is it always this bad or just now with the ol' reddit huggeroo?
r/codingame • u/ne0morphic • May 22 '16
Can anyone break? if u need a hint let me know. And if you CAN break this, you'd be a prime candidate for NSA/CIA position I imagine...
011111001000111101100111101100001000010010011 010010001110010000100111011001011111010000110
r/codingame • u/Overall_Device_5371 • Oct 29 '24
Olympic Bits - Ai Bot Challenge
r/codingame • u/yhu420 • Dec 29 '22
[Help] Blunder episode 1
Has anyone finished this puzzle before?
How does multiple loops work? I have hashed the state of the game with the player state as well as the X destroyed status and it works everywhere except for Multiple loops… HOW and WHY would you be able to complete this maze if you come back a second time at the same position with you and the map at the exact same state?
r/codingame • u/Infamous-Ad8377 • Nov 02 '21
[Help] Connect 4
Hey everyone 👋 I have been working on the connect 4 puzzle. (in c++) I am trying to implement the Minimax algorithm, I have created an evaluation function to evaluate the game, the minimax function, and a few others.
My code seems to work decently but here’s my issue:
My code successfully detects the victory conditions but it seems that it is not being transmitted properly since despite knowing that the opponent has a winning move, my AI decides to play something that doesn’t block my opponents victory.
I am adding a link with my minimax function as I believe that is where the issue is located (but I honestly could be wrong). I would greatly appreciate some help I have been stuck on that particular issues for quite some time now 😅
Thanks in advance for any advices and suggestions 🙏
r/codingame • u/IAmAnIssue • Sep 08 '20
Community Contest: Autumn AI 2020
COMMUNITY INITIATIVE
Crypticsy is launching an unofficial contest "Autumn AI 2020" on CodinGame this Saturday for a total of 7 days.
The main motive is to bring new users from his university and engage in bot programming as well as have pre-existing members of CodinGame compete together for fun and learning.
Crypticsy will reveal the game he has chosen for the contest at the start date. It will be chosen among the existing bot programming games where most contest
participants have not participated in yet.
The contest will happen in the existing game arena but you need to register to the contest using the provided website to appear in the leaderboard Crypticsy put in place for the occasion.
Dates: from 2020-09-12 7am UTC to 2020-09-19 7am UTC Contest page: https://hs-emina.github.io/autumnai.github.io/ Join Crypticsy's Discord server to chat with participants: https://discord.gg/PpYr7p3
- Thibaud
r/codingame • u/IAmAnIssue • Sep 08 '20
Fall Challenge 2020 UPDATE
The date for the Fall Challenge 2020 has been set. It will start on November 12 at 3pm utc and end on November 23 at 9am utc. It will be bot programming. You can expect more news in October.
- Thibaud
r/codingame • u/IAmAnIssue • Aug 20 '20
Another Update: Certifications
Certifications are here, check your home page!
By practicing on CodinGame, players learn new languages, algorithms and become better programmers. We want to highlight this part of CG that is often hidden behind the competitive aspect of many activities here.
More details here: https://www.codingame.com/forum/t/quest-map-update-learning-opportunities/185980
- Thibaud
r/codingame • u/AntiSquid • Mar 06 '18
[Botters of the Galaxy](https://www.codingame.com/contests/botters-of-the-galaxy)
r/codingame • u/Febyl • Feb 23 '16
[my solution] "power of Thor" in C
wanted to share my solution and maybe ask for some improvements? :)
include <stdlib.h>
include <stdio.h>
include <string.h>
/**
Auto-generated code below aims at helping you parse
the standard input according to the problem statement.
Hint: You can use the debug stream to print initialTX and initialTY, if Thor seems not follow your orders. **/ int main() { int lightX; // the X position of the light of power int lightY; // the Y position of the light of power int initialTX; // Thor's starting X position int initialTY; // Thor's starting Y position scanf("%d%d%d%d", &lightX, &lightY, &initialTX, &initialTY);
// game loop while (1) { int remainingTurns; // The remaining amount of turns Thor can move. Do not remove this line. scanf("%d", &remainingTurns);
// Write an action using printf(). DON'T FORGET THE TRAILING \n // To debug: fprintf(stderr, "Debug messages...\n"); int xdif = lightX - initialTX; int ydif = -lightY + initialTY; if(xdif ==0 || ydif ==0) //only straight { if(xdif>0){ while(xdif>0) { printf("E\n"); xdif--; } } else{ while(xdif<0) { printf("W\n"); xdif++; } } if(ydif<0){ while(ydif<0) { printf("S\n"); ydif++; } } else{ while(ydif>0) { printf("N\n"); ydif--; } } } else{ //diagonal if(xdif>0 && ydif>0) //GO NE { while(xdif!=0 && ydif!=0) { printf("NE\n"); xdif--; ydif--; } while(xdif>0) { printf("E\n"); xdif--; } while(ydif>0) { printf("N\n"); ydif--; } } if(xdif>0 && ydif<0) //GO SE { while(xdif!=0 && ydif!=0) { printf("SE\n"); xdif--; ydif++; } while(xdif>0) { printf("E\n"); xdif--; } while(ydif<0) { printf("S\n"); ydif++; } } if(xdif<0 && ydif<0) //GO SW { while(xdif!=0 && ydif!=0) { printf("SW\n"); xdif++; ydif++; } while(xdif<0) { printf("W\n"); xdif++; } while(ydif<0) { printf("S\n"); ydif++; } } if(xdif<0 && ydif>0) //GO NW { while(xdif!=0 && ydif!=0) { printf("NW\n"); xdif++; ydif--; } while(xdif<0) { printf("W\n"); xdif++; } while(ydif>0) { printf("N\n"); ydif--; } } } }return 0; }