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

After a few steps I encounter an error on my terminal. #3

Open
Pigorous opened this issue Dec 26, 2023 · 1 comment
Open

After a few steps I encounter an error on my terminal. #3

Pigorous opened this issue Dec 26, 2023 · 1 comment

Comments

@Pigorous
Copy link

Pigorous commented Dec 26, 2023

Traceback (most recent call last):
File "/home/hoplite/main.py", line 3, in
import hoplite.main
File "/home/hoplite/hoplite/main.py", line 243, in
main()
File "/home/hoplite/hoplite/main.py", line 236, in main
play(args.serial, args.prayers, args.record)
File "/home/hoplite/hoplite/main.py", line 87, in play
controller.run()
File "/home/hoplite/hoplite/controller.py", line 192, in run
self.step()
File "/home/hoplite/hoplite/controller.py", line 155, in step
move = self.brain.pick_move(self.memory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/hoplite/hoplite/brain.py", line 172, in pick_move
best_move = max(outcomes.items(), key=lambda x: x[1])[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: max() arg is an empty sequence

@ychalier
Copy link
Owner

Hey,

That happens when the script thinks it has no available move, which should not happen during the game? So I would say this results from screen observation errors. Check that:

  1. you're using a phone with a screen resolution of 1080*1920 (or edit observation functions accordingly) and
  2. classifier tolerance is high enough (as in the classifier-tempfix branch).

Even with that, there will still be errors until classifiers are fixed (see classifier-tempfix README). For troubleshooting, you may save screenshots of the game with the -r flag, and later check what the script thinks it sees with the check action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants