Fall Challenge 2020 - Puzzle discussion

Feel free to send your feedback or ask some help here!
Don’t hesitate to check out the topic for the contest of the same name: https://forum.codingame.com/t/fall-challenge-2020-feedbacks-strategies/187846/2

1 Like

Hi !
There is something weird happening in that replay at the beginning, turn 3.
Both players learn the first tome, tome 16. According to the interface, it does not have a tax on it.
Yet Bossdorf gets an extra tier-0 ingredient while AWOL doesn’t.
Is this a bug ?

2 Likes

The interface appears wrong indeed, but not in turn 3. If I trace things by hand: (asterisk is tax)

Tomes @0: 8 40 14 2 16 21 …

Turn 1:
Left LEARN 14 (tax 2, new inventory 1)
Right LEARN 8 (-)
Tomes @1: 40* 2* 16 21 …

Turn 2:
Left LEARN 2 (tax 1 payback 1, inventory stable) ← your inventory should be 1, viewer shows 2
Right LEARN 40 (payback 1 new inventory 4)
Tomes @2: 16* 21 … ← there is 1 tax on tome 16, viewer doesn’t show it

Turn 3:
Left LEARN 16 (payback 1, new inventory 2)
Right LEARN 16 (payback 1, new inventory 5)
Tomes @3: 21 …
[viewer back to normal]

First guess without source-diving would be that the viewer doesn’t gets confused when the tax is placed on spells above what was learnt. (I know I was)

Do your inputs confirm?

1 Like

This issue has been fixed: https://www.codingame.com/replay/511388061
Thank you for these inputs, they allowed record time bug crushing.

1 Like

What was the problem? I see no change on github :face_with_raised_eyebrow:

1 Like

On Wood 1 League With JS, inputs[9] (castable bit) always returns undefined.

no, it doesn’t. Try to print the input in the console just after you read it. The bug is in your code :wink:

Hello, everybody!
I am the 1st on the Wood 2 League, but never been at the Wood 1 League.
Can anyone help me for reaching it?

That’s so strange…

Hi everyone !
I have a problème / question.
I’m just reached the bronze league. Now i can learn spell. To test if my code take care of it, i only learn a spell at each round.
I am block after i learn 7 spells and can’t learn the next one. The informations was not accurate.
Is it normal ?

There is no such limit on the amount of spells you can learn. What do you mean by ‘blocked’? The first spell of the list is free, but you need to place ingredients down if you want to learn a spell further up the list. Could this be your issue?

1 Like

The input for each turn includes a list of all the spells you can learn. The information for each spell includes its action id and its “read ahead” cost (the number of ingredient 0 you must pay to the spell). Just make sure you have enough ingr 0 for the spell you want and send the command LEARN <action id>.

1 Like

Two answer waouh thanks :slight_smile:
_CG_jupoulton I didn’t see such a limit either. I only whant to take the first spell of the list so i didn’t raised the taxe condition. I take picture but i can’t send one here :disappointed_relieved: .
Mackeyth I read my log and i see tome_index = 5.
So you are both right ! Spell to learn aren’t spend in order ( 0 to 5 ). So i forgot the vérification :sweat_smile:
Thank you both of you :slight_smile:

1 Like

Yo !
I’m stuck in wood guys :s My sorcer doesnt know how to use spell when she’s on red side.
I use “CAST 78” for exemple to cast, but obv it doesnt work on enemy side :confused:
How to detect my side ?
Peace

Hello,
Your side is irrelevant. You are given a list of spells in the input and whether it’s possible for you to cast them. Reuse the id of the available spell you would like to cast in your output.

If you look at the console on the frame your witch fails to CAST, there will be a warning message deailing what the exact issue is. If it says “Spell is exhausted” for instance, you must first REST. If it says “Tried to cast an opponent’s spell”, then you are not correctly storing the right spell ids.

Good luck

Perfect answer ! Thanks a lot for it.
Gonna check my inventory after first action ! I’ll be able to know if my spell worked or not =).
If not i’ll switch cast names !
Peace

I’m starting to find an answer to the game, but I was wondering. Is there a way to know the inventory of my opponent, other than assuming it is the same as the one we start with, or after a certain league we get provided of this? Also, as we are not provided with all the future orders I found it kind of hard to use Monte Carlo Decision Trees, as it wouldn’t be a perfect information game. Any recommendation or tip would be really appreciated it.

How to do a good beam search? Mine is shit !!! Anybody can help me ? PLS.
MAYBE my questions is HOW TO GET UP LEGEND ? I’M STUCK IN GOLD ?