Problem 895

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
Post Reply
eins.tronix
Posts: 2
Joined: Sun Jun 30, 2024 10:11 pm

Problem 895

Post by eins.tronix »

What is the exact meaning of "both play optimally"? Is "an optimal move" the best move that one can play in order to beat the other party or any one of the moves that can lead to end of a fair game?
User avatar
neverforget
Posts: 88
Joined: Sat Sep 16, 2006 10:10 pm

Re: Problem 895

Post by neverforget »

Problem 895 (View Problem)
eins.tronix wrote: Sun Jun 30, 2024 10:22 pm What is the exact meaning of "both play optimally"? Is "an optimal move" the best move that one can play in order to beat the other party or any one of the moves that can lead to end of a fair game?
I don't think optimal play is ambiguous here. There is complete information, no randomness, no draws. So optimal play simply means neither player will make a move that forfeits a winning position.
Image
eins.tronix
Posts: 2
Joined: Sun Jun 30, 2024 10:11 pm

Re: Problem 895

Post by eins.tronix »

Is this arrangement fair?
G S
S G S
G G S
User avatar
neverforget
Posts: 88
Joined: Sat Sep 16, 2006 10:10 pm

Re: Problem 895

Post by neverforget »

eins.tronix wrote: Wed Jul 03, 2024 10:58 pm Is this arrangement fair?
G S
S G S
G G S
No.
Image
raiden11
Posts: 5
Joined: Sat Aug 03, 2024 7:07 pm

Re: Problem 895

Post by raiden11 »

On Gary's turn he chooses a gold coin and removes it from the game along with any other coins sitting on top. Sally does the same on her turn by removing a silver coin.
Please tell me if I understand the game properly.
It's clear that Gary has to pick up at least one gold coin from the top. But he may or may not pick other coins or he necessarily has to pick up at least one other coin? And the other coins can be picked up from the top of first pile (from which the gold coin was picked up) only or top of any pile is fine?

And the same rules apply to Sally, just with the first coin being silver.
philiplu
Posts: 92
Joined: Wed Aug 02, 2017 8:51 pm
Location: Redmond, WA, USA

Re: Problem 895

Post by philiplu »

raiden11 wrote: Thu Aug 22, 2024 3:29 pm Please tell me if I understand the game properly.
It's clear that Gary has to pick up at least one gold coin from the top. But he may or may not pick other coins or he necessarily has to pick up at least one other coin? And the other coins can be picked up from the top of first pile (from which the gold coin was picked up) only or top of any pile is fine?

And the same rules apply to Sally, just with the first coin being silver.
No, it's simpler than that. Say it is Gary's turn. If there are no gold coins in any of the piles, Gary loses. Otherwise, Gary can pick any gold coin he wants, and removes that coin. If that chosen coin isn't at the top of a pile, Gary must also remove all the coins which rest on top of his chosen coin, no matter whether they are gold or silver.
Image
Post Reply