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

Hazard avoid and floodfill path choice #370

Closed
wants to merge 29 commits into from
Closed

Hazard avoid and floodfill path choice #370

wants to merge 29 commits into from

Conversation

djdefi
Copy link
Member

@djdefi djdefi commented Apr 14, 2023

Testing some possible things

@djdefi djdefi requested a review from bevns as a code owner April 14, 2023 05:48
@github-actions
Copy link
Contributor

👋 Thanks for opening a pull request!

If you are new, please check out the deployment process to understand how to deploy this pull request. A trimmed down summary will be listed below:

  1. 👀 Observe the CI and ensure it is passing

  2. ✔️ Obtain an approval/review on this pull request

  3. 🔒 Optionally claim the deployment lock with .lock --reason <text> if your change is more complex

  4. 🚀 Branch deploy your pull request to production

    Comment .deploy on this pull request to trigger a deploy. If anything goes wrong, rollback with .deploy main

  5. 🎉 If you branch deployment completes successfully, merge your pull request!

@github-actions
Copy link
Contributor

github-actions bot commented Apr 14, 2023

🤖 🐍:

Simulating battlesnake with the following settings:
  mode: wrapped
  runs: 10
  map: hz_islands_bridges
  height: 11
  width: 11
  verbose: 
  seed: 1526
Run [1/10] winner: ruby-danger-noodle
Run [2/10] winner: ruby-danger-noodle
Run [3/10] winner: ruby-danger-noodle
Run [4/10] winner: pathy
Run [5/10] winner: ruby-danger-noodle
Run [6/10] winner: ruby-danger-noodle
Run [7/10] winner: ruby-danger-noodle
Run [8/10] winner: pathy
Run [9/10] winner: pathy
Run [10/10] winner: ruby-danger-noodle
      7 ruby-danger-noodle
      3 pathy

@djdefi
Copy link
Member Author

djdefi commented Nov 16, 2023

@bevns should we merge this or leave it?

This pull request to snakes/go/pathy-snake adds new functionality to improve the snake's decision-making process, modifies existing functions to improve their efficiency, and improves the testing suite. The most important changes include marking cells surrounded by snakes as not walkable, modifying the chooseTargetCell function to use a new floodFill algorithm, and adding new functions to help the snake navigate the game board more efficiently.

Main functionality changes:

  • snakes/go/pathy-snake/pathing.go: Added new functionality to choose the largest open area on the board as the target cell if no food is available, and marked cells surrounded by snakes as not walkable. (F188586a)
  • snakes/go/pathy-snake/helpers.go: Modified the chooseTargetCell function to use a new floodFill algorithm, and added new helper functions to support it. (F55a0970)
  • snakes/go/pathy-snake/paths.go: Added functions to help the snake navigate the game board more efficiently in func (p *Path) AtEnd() bool in snakes/go/pathy-snake/paths.go.

Testing improvements:

  • snakes/go/pathy-snake/logic_test.go: Improved the testing suite by adding new test cases and reducing the number of iterations in TestFoodEating6 function. (F98a4544)

Other changes:

@bevns
Copy link
Contributor

bevns commented Nov 16, 2023

I think we should just leave it. Its new but it didn't really preform any better.

@bevns bevns closed this Nov 16, 2023
@djdefi djdefi deleted the djdefi-pathai branch November 16, 2023 23:34
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.

None yet

2 participants