mainIine / foe-helfer-extension

FoE Helfer - Extension for chromium based browsers and Firefox ;-)
https://foe-helper.com
GNU Affero General Public License v3.0
122 stars 180 forks source link

Improvement for negotiation helper #2539

Closed ghost closed 1 year ago

ghost commented 1 year ago

The negotiation helper does not always choose the most likely goods.

Especially at the end of the negotiation, the negotiator takes the goods that are most in stock. However, these are often not the goods that are most likely to be the best solution.

Simple example: 2 rounds with only 3 goods (red, green, blue)

Round 1: Player chooses: red, red, red, red, green Result round 1: ok, ok, ok, ok, false (so only one place is missing and green is it not)

The best solution for this is to try with blue at position 5, but if there is more red in stock, the negotiation helper uses red.

Gindi4711 commented 1 year ago

The negotiation helper will always pick the combination with the highest chance of solving. When there are multiple combinations with the same cost it will pick the combination with the lowest average weighted good cost.

The order of goods before round1 will determine which good is treated as "cheaper". Default values is prefering goods with higher stock first.

In your example: 3 goods 3 rounds mean chance of solving is always 100% not matter what goods you pick so it will always pick cheapest goods

So in your example: Guess1: Good1, Good1, Good1, Good1, Good2 (this is not a guess helper will suggest. Round1 with 3 goods will always be: 2Good1, 2Good2, 1*Good3, but lets keep this as example) Result1: Red, Red, Red, Red, Green

Slot1: Solved Slot2: Solved Slot3: Solved Slot4: Solved Slot5: Can be either Red or Blue, both with a 50% chance of solving in round2

Helper has 2 options: .) Choosing red in round2, if this is not correct choose Blue in round3 => Average cost of 1 red + 0.5 blue (red is always used, blue only at a chance of 50%), total good cost 1.5 .) Choosing blue in round2, if this is not correct choose Red in round3 => Average cost of 1 blue + 0.5 red (blue is always used, red only at a chance of 50%), total good cost 1.5

So negotion helper will prefer choosing the good first that has higher stock because it is determined to be "cheaper"

ghost commented 1 year ago

The negotiation helper will always pick the combination with the highest chance of solving.

This is not true.

Slot5: Can be either Red or Blue, both with a 50% chance of solving in round2

And this is wrong. Because we have already 4 red and no blue, there is a much higher chance that the last position is blue.

Gindi4711 commented 1 year ago

1.) Can you provide a screenshot for such a case.

2.) No it is not. If we assume goods are randomly chosen the chance for both red and blue is both 50%. It does not matter which color the other goods have been. If you are throwing a coin 4 times and get 4 times head it is still a 50/50 for the 5th throw.

ghost commented 1 year ago

If you are throwing a coin 4 times and get 4 times head it is still a 50/50 for the 5th throw.

This would be the case when you redraw the hidden fields every round. But in this game the hidden fields are only drawn once at the beginning. This results is different probabilities in the following rounds.

Can you provide a screenshot for such a case.

I will try, but it can take some time.

ghost commented 1 year ago

helper

This is an example. There are already 3 AI Data and no Nanowire, but the FoE helper recoments AI data for the last position.

ghost commented 1 year ago

I was probably mistaken. I did a (simplified) test with a small computer program and the probability was 50% to 50%.

The ticket can be closed.