Looking to change my static algo but dont know where to start

Hey I’m pretty new to coding and have created a static algo that does fairly well but im looking to make the algo dependant on the other players attacks and check paths before attacking but I have no clue where to start

quick search on the forum :wink:

Thank you

you could get some quick boost just by searching the attack paths from each starting position using the builtin pathfinder…next step is to simulate adding your own obstacles to see how that increases the attack damage.

locationTopLeft = game_map.get_edge_locations(game_map.TOP_LEFT)
for location in game_map.get_edge_locations(game_map.BOTTOM_RIGHT):
     path = self.finder.navigate_multiple_endpoints(location, locationTopLeft, game_state)  
     for loc in path:
            for loc2 in self.fast_get_locations_in_range(location,3.5):
                    #add up targets and defenses...

to keep track of the other players attack you need to analyze the frames, add an ‘on_frame’ function thats a lot more difficult but needed eventually.

1 Like

thank you been going at it for a few hours still hadnt gotten very far hopefully this will help

It is good exercise to try and build few different algo types:
Maze, Cannon, Demux, and copy some of the bosses you like.
Ideally, reuse much of the your current code base.

This will help you to understand more of the tools and mechanics of the game.

Also if there is a specific type of enemies, that give you trouble, I personally like to make a copy of them,
and fight them locally. This gives you a better perspective how the work, and for your algo weakness.
Then work on some specific counter attacks or modifications.