greeness / yahtzee-optimal-strategy

MIT License
5 stars 3 forks source link

Error #1

Open croutee opened 10 years ago

croutee commented 10 years ago

Hi,

I'm reading your code. Good Job.

Now, I'm trying to launch sim_game.py and obtained this error : Traceback (most recent call last): File "C:\Users\sc\yahtzee\yahtzee-optimal-strategy-master\yahtzee-optimal-strategy-master\sim_game.py", line 85, in load_expectation() File "C:\Users\sc\yahtzee\yahtzee-optimal-strategy-master\yahtzee-optimal-strategy-master\widget.py", line 259, in load_expectation E0 = json.load(open('./data/exp%s.json' % timestamp)) IOError: [Errno 2] No such file or directory: './data/exp.json'

And with sim_game_with_cache : Traceback (most recent call last): File "C:\Users\sc\yahtzee\yahtzee-optimal-strategy-master\yahtzee-optimal-strategy-master\sim_game_with_cache.py", line 237, in load_optimal_strategy() File "C:\Users\sc\yahtzee\yahtzee-optimal-strategy-master\yahtzee-optimal-strategy-master\sim_game_with_cache.py", line 40, in load_optimal_strategy id_to_state_json = json.load(open('./data/id_to_state.json')) IOError: [Errno 2] No such file or directory: './data/id_to_state.json'

What is the job of these files ? Where can I obtain them ?

Thanks a lot !

Regards.

Croutee

gaznu commented 8 years ago

Hi,

Same problem here. If these files could be included, that would really help trying out your implementation. Right now it is not accessible (to me).

Regards

gerwin3 commented 7 years ago

You need to do generate the expectation files yourself:

  1. mkdir data
  2. uncomment line widget.py:372 (e.g. call to training_expectation())
  3. run widget.py to generate expectation files
gerwin3 commented 4 years ago

I created a pull request with working changes here: https://github.com/greeness/yahtzee-optimal-strategy/pull/2

Should allow for generating the files (though it takes a long time).