Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base Bot #55

Merged
merged 24 commits into from
Jan 3, 2024
Merged

Base Bot #55

merged 24 commits into from
Jan 3, 2024

Conversation

brandongasser
Copy link
Contributor

No description provided.

Copy link
Contributor

@KingPhilip14 KingPhilip14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few changes and asking for clarification. This all looks good!

base_client.py Outdated

# This is where your AI will decide what to do
def take_turn(self, turn, actions, world, avatar):
def take_turn(self, turn: int, actions: ActionType, world, avatar):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was the type hinting removed here?

base_client.py Outdated
"""
return self.find_all(world, lambda tile: tile.occupied_by is not None and tile.occupied_by.object_type == object_type)

def find_all(self, world, criteria):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have something like this in game_board.py called get_objects where it takes the object type and gives back a list of tuples of the object and its coordinates. This is good but ends up being redundant.

game/config.py Outdated
@@ -15,7 +15,7 @@

MAX_SECONDS_PER_TURN = 0.1 # max number of basic operations clients have for their turns

MAX_NUMBER_OF_ACTIONS_PER_TURN = 2 # max number of actions per turn is currently set to 2
MAX_NUMBER_OF_ACTIONS_PER_TURN = 1000 # master_controller will be handling max actions enforcement for Byte-le 2024 "Quarry Rush"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There will only be 5 max actions per turn because of a max of 4 movement options in a turn and the auto-selling action. As you already established in the master controller, any other action will take the entire turn. Change this here to reflect this and not loop an unnecessary amount

game/controllers/master_controller.py Show resolved Hide resolved
Copy link
Contributor

@KingPhilip14 KingPhilip14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!

@brandongasser brandongasser merged commit 0172abe into master Jan 3, 2024
1 check passed
@brandongasser brandongasser deleted the base-bot branch January 3, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants