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

Explain rules in a little bit more detail. #226

Open
Kesanov opened this issue Nov 15, 2016 · 2 comments
Open

Explain rules in a little bit more detail. #226

Kesanov opened this issue Nov 15, 2016 · 2 comments
Assignees

Comments

@Kesanov
Copy link

Kesanov commented Nov 15, 2016

Currently the intro doesn't explain:

  1. Does production change over time?

  2. Do all players move simultaneously? (Thus you can exchange position with other player next to you)

  3. Does strength increase phase take place before / after attack phase?

@robertmassaioli
Copy link

robertmassaioli commented Nov 16, 2016

I too struggled with these questions. This is what I think:

  1. Production is a constant and never changes once set; only strength changes. Either when attacked (decrease), when you stay still (increase) or when you merge (globally unchanged).
  2. The game operates in turns, all of the moves in a turn are one simultaneous action. However, exchanging positions is possible but the attack still occurs.
  3. They happen simultaneously AFAICT. All that matters is that a piece's final strength is greater than zero after all strength increases and damages have been tallied.

I hope that answers your questions. I think it would be great to add a documented page on the pseudocode that one would need to implement to evaluate a game frame. Most people are going to want to re-implement the game logic in their code so that their AI can make predictions about the value of future actions.

Edit: I am actually less sure about point number 3 now. Based on the 'Turns' section of this page (https://halite.io/rules_game.php) I would actually say that the strength update and cap happens BEFORE the attack calculations are computed.

@truell20 truell20 added this to the Sprint 2 milestone Nov 16, 2016
@robertmassaioli
Copy link

robertmassaioli commented Nov 18, 2016

Another situation that I ran into today when writing my bot:

If you have a board with the following two pieces (surrounded by unowned pieces):

(1, 1) (P: _, S: 5)
(2, 1) (P: 10, S: 10)

And you make the move:

(1, 1) EAST

Then is the final state:

(1, 1) (P: _, S: 0)
(2, 1) (P: 10, S: 25)

Or:

(1, 1) (P: _, S: 0)
(2, 1) (P: 10, S: 15)

As in, does the piece at (2, 1) gain strength as well as the merge or does a merge negate the production strength gain? Not totally clear from the documentation. I think that the first case is what happens and I'll be reading the source to confirm.

@truell20 truell20 modified the milestones: Sprint 2 (Before Pruning), Sprint 3 Nov 27, 2016
@truell20 truell20 removed this from the Sprint 3 milestone Dec 23, 2016
@truell20 truell20 removed the priority label Dec 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants