Crystal Rush - Puzzle discussion (previously Unleash The Geek)

This is the game of last year’s competition “Unleash the Geek” by Amadeus. For contractual reasons, we couldn’t keep the name “Unleash the Geek”.

https://www.codingame.com/multiplayer/bot-programming/crystal-rush

We’ve pushed every AIs from the contest into the new arena. Enjoy!
:slight_smile:

10 Likes

_CG_Thibaud thanks for releasing this game, it is really fun. But why there are no codingpoints for it in BotProgramming section of my profile?

After 1 or 2 days delay, the CP appeared for me.
Getting also the XP for promotion to Bronze+Silver+Gold would be great, same way as if we would have re-submitted manually! :slight_smile: (not that I am complaining, thanks for releasing this!!!)

Pretty interesting puzzle! I’m curious how people generally approached picking out actions for each bot.

Then you should give this thread a read:
https://www.codingame.com/forum/t/unleash-the-geek-feedback-strategies/133878

2 Likes

Hi there, with Python, I have an issue where the IDE tells me that I have desync issues because I am not reading all of the inputs.

I tried adding some input() calls, but this blocks the execution of the code, meaning that I was reading all of the possible inputs.

Could someone help?

Cheers

1 Like

The most likely thing is you are printing too much on one turn (meaning the server sees you output moves for a turn before it has sent the input for that turn). Make sure you only output 5 lines for each set of input you get.

1 Like

I’m a beginner/noob at Crystal Rush, and I still don’t understand how to find if a spot on the grid contains ore. I appreciate any help. Thank you!

Pick a radar. Plant the radar in a hole by digging into the hole.It will give you ore information on all holes within a given radius.

2 Likes

Okay, thank you!

Sorry about this ping, but is there a way to identify the x and y coordinates of the robot being controlled? Thank you!

The coordinates of all bots are in the inputs

Okay, thank you!

I have a hard time figuring out the distance robots can travel. In an orthogonal direction, it’s definetely four tiles, but I can’t find consistant results when targeting a tile that is not in an orthogonal straight line.

Hi I started doing this puzzle and am having a lot of fun, but I can’t seem to scan the opponents robots items.

My code for scanning the characters:

myRobots, opponentRobots, radars, traps := []entity{}, []entity{}, []entity{}, []entity{}

for i := 0; i < entityCount; i++ {
	// entityId: unique id of the entity
	// entityType: 0 for your robot, 1 for other robot, 2 for radar, 3 for trap
	// y: position of the entity
	// item: if this entity is a robot, the item it is carrying (-1 for NONE, 2 for RADAR, 3 for TRAP, 4 for ORE)
	var entityId, entityType, x, y, item int
	scanner.Scan()
	fmt.Sscan(scanner.Text(), &entityId, &entityType, &x, &y, &item)

	if entityType == 0 {
		myRobots = append(myRobots, entity{entityId, entityType, x, y, item})
	} else if entityType == 1 {
		opponentRobots = append(opponentRobots, entity{entityId, entityType, x, y, item})
	} else if entityType == 2 {
		radars = append(radars, entity{entityId, entityType, x, y, item})
	} else if entityType == 3 {
		traps = append(traps, entity{entityId, entityType, x, y, item})
	}
}

I use a struct to store all the characters:

type entity struct {
	entityId, entityType, x, y, item int
}

I know what items my robots are carrying, but I don’t know what my opponents robots are carrying. Could someone show me what I am doing wrong?

Thanks

I think there’s something wrong. I got moved to the bronze leage and my AI does not even
work.

+1 to this. I think the author meant to hide the enemy’s items intentionally, because otherwise you could track their drops and break the game. However, the instructions do need to be changed.

Hello! Please change this line in the instructions:
“item: if this entity is a robot, the item…”
to:
“item: if this entity is YOUR robot, the item… , otherwise -1”

You’ll probably get a better response time if you post your request on the bug reporting channel on CodinGame’s Discord server.