ad
ad

Coding Protoss Bot Reactions - Day 23

Gaming


Introduction

Hello everyone! After a week's break, we're back for another session of coding our Protoss bot, lovingly named "Angler." This week, we plan to dive into some exciting development and troubleshooting, addressing both the replays from the previous matches and some refactoring of our code.

Understanding Mob Programming

Before jumping into the coding, let's take a moment to talk about mob programming. It’s a collaboration method where a group of people works together to write code. Within this setup, there are three key roles:

  1. Driver - The person typing the code.
  2. Navigator - The one who guides the direction of the code, keeping an eye on the overall architecture and flow.
  3. The Mob - The rest of the group providing feedback on the implementation.

The benefits of mob programming include interpersonal engagement and the opportunity for mentorship. We also have collective ownership of the code, leading to better problem-solving and coding efficiency.

Current Bot Performance

Our Protoss bot, Angler, currently ranks 14th on the ladder with 426 wins and 596 losses, having participated in 1,000 matches over the last week. While those numbers seem daunting, we view them as stepping stones to improvement. Today, we plan to:

  • Review replays of matchups, including wins and losses against other bots.
  • Identify key areas for improvement based on the replay reviews.
  • Refactor and clean up the existing code to make it more manageable for everyone involved.

Replay Analysis

In analyzing replays, we focus on particular matches that showcase both our bot's strengths and weaknesses. For example, Angler surprisingly secured a win against "Cognite," the top-ranked bot. Exploring this match sheds light on our bot's strategies.

Some key observations from our matches:

  • The zealots in our bot sometimes do not attack.
  • We struggled to keep our formations intact, especially when engaging in combat.

Refactoring Code

During today's session, we will refactor Angler’s code to enhance clarity and organization. This means breaking down complex methods into smaller, more manageable pieces that are easier to understand and maintain. By using tools like chat GPT, we aim to structure our code logically while ensuring existing functionalities remain intact.

We will focus on:

  • Cleaning up the main onStep method, which controls the bot's actions.
  • Ensuring attack methods are clear and efficient.
  • Documenting code changes to facilitate better collaboration in future updates.

Conclusion

As we wrap up this session, remember that coding is an iterative process. Each match gives us feedback that directly influences our bot's logic and our coding methodologies. I appreciate everyone’s contributions today and encourage you all to check out our code on GitHub, where you can leave your thoughts and suggestions for improvements.

Until next week, happy coding!


Keywords

  • Mob Programming
  • Protoss Bot
  • Angler
  • Refactoring
  • Coding
  • Game Replays
  • AI Bot

FAQ

Q1: What is mob programming?
A1: Mob programming is a collaborative coding approach where a group of people work together on the same codebase, sharing roles like Driver, Navigator, and Mob to improve productivity and enhance coding practices.

Q2: How does the current bot rank on the ladder?
A2: Angler is currently ranked 14th with 426 wins and 596 losses from 1,000 matches over the past week.

Q3: What are the plans for the next coding session?
A3: The next session will focus on reviewing replays, identifying areas for improvement, and refactoring the bot’s code for better organization and clarity.

Q4: Where can I find the bot's code?
A4: The code for Angler can be found on our GitHub repository. Users are encouraged to browse and leave suggestions for improvements.