My humble solution to the CodinGame 2022 Spring Challenge
Participated in the CodinGame 2022 Spring Challenge. It turned out to be a fascinating experience at the intersection of psychology and IT.
What does psychology have to do with any of this? Simply this: in this challenge, you write code to command a trio of «little soldiers» tasked with fending off monsters and outmaneuvering your opponents.
I implemented a weighted decision-making system. Every potential action is assigned a specific weight, calculated not only from the current state of the game world but also from an array of numbers that constitute the unique «personality» of each individual soldier.
Since the numbers differ, so do their personalities. The soldiers make their in-game choices based on these numerical traits. Consequently, at any given moment, I never know exactly what a specific soldier will do. I am only guiding them implicitly, having assigned these numerical «personalities» before the match even began. And there you have psychology in action. :)
I didn't secure any prize-winning spots, and for good reason:
I was writing the code rather casually in my spare time, which is currently in short supply;
The CodinGame platform itself offered no built-in way to optimize the soldiers' personalities using a simple neural network or a GA. Frankly, I had no desire to manually brute-force various combinations of 18 (3 soldiers × 6 personality traits) floating-point numbers.
Yearning for the strange? Try the blog fortune-telling:
Tags: IT ✦ psychology ✦ competition ✦ CodinGame ✦ spring ✦ challenge ✦ 2022 ✦ solution
This publication, including its text, graphics, audio, and video content, is provided for informational and illustrative purposes only and does not constitute professional advice. Any scenarios described in this publication are hypothetical and do not indicate any specific outcome that may be achieved by relying on the conclusions drawn from this publication. Results of any actions (or inactions) may vary depending on both individual circumstances and external factors. The author assumes no responsibility for decisions made based on the content of this publication. Always consult with qualified professionals before making important business or personal decisions.