Closed gaogaotiantian closed 2 years ago
Okay after some digging into kaggle(this is my first kaggle competition), maybe agent
has to be a function? There are some ways to making it stateful, but it would be nice to know it ahead(without knowledge about kaggle). If this is the case, then you can close this issue.
Yes agent
has to be a function. I don't recommend editing main.py
Kaggle actually reads the last function in agent.py as your agent
You can store global variables as state (e.g. game_state
is done for you)
main.py is for the CLI tool primarily (but kaggle also requires you to submit it as well)
I changed
main.py
to keep states. I thought kaggle simply usemain.py
as stdout pipe but I was obviously wrong. There's some fancy stuff going in the engine and my code can't run.CLI worked fine locally with
lux-ai-2021
.What I did is pretty simple, just instantiate a class and use the class method to parse the observation:
The json err log said
So clearly it tries to do something clever instead of just running
main.py
file. How could I know that the code that's working locally won't fail when submitted and how should I fix this?