Coder Social home page Coder Social logo

adversarialchess's People

Contributors

2014mchidamb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

adversarialchess's Issues

'Game' object has no attribute 'is_end'

Hi,

I was planning to open a PR with updated instructions for conda.

I believe I've successfully installed everything - but I can't get
python process_data.py to run.

[Event "FICS rated standard game"]
[Site "FICS freechess.org"]
[Date "2017.01.31"]
[Round "?"]
[White "aberleider"]
[Black "rewqfdsa"]
[Result "1-0"]
[FICSGamesDBGameNo "410988594"]
[WhiteElo "2138"]
[BlackElo "1925"]
[WhiteRD "57.9"]
[BlackRD "34.8"]
[TimeControl "2700+15"]
[Time "22:37:00"]
[WhiteClock "0:45:00.000"]
[BlackClock "0:45:00.000"]
[ECO "D01"]
[PlyCount "79"]

  1. d4 d5 2. Nc3 Nf6 3. Bg5 Nbd7 4. Qd3 h6 5. Bh4 g5 6. Bg3 a6 7. O-O-O Bg7 8. h4 g4 9. e4 dxe4 10. Nxe4 Nxe4 11. Qxe4 Nf6 12. Qe5 c6 13. Ne2 Qd5 14. Nc3 Qxe5 15. Bxe5 O-O 16. Bd3 h5 17. Ne2 Nd5 18. Bxg7 Kxg7 19. c4 Nf6 20. Nf4 Rd8 21. d5 cxd5 22. cxd5 Nxd5 23. Bc4 e6 24. Nxh5+ Kf8 25. Nf6 Ke7 26. Nxg4 b5 27. Bxd5 exd5 28. Rhe1+ Kf8 29. Ne5 Bf5 30. Kd2 f6 31. Nc6 Rd6 32. Nd4 Bd7 33. Rc1 Kg7 34. Re7+ Kg6 35. Rc7 Rd8 36. g4 Kh6 37. f4 Kg6 38. h5+ Kh6 39. Rcxd7 R6xd7 40. Nf5# { Black checkmated } 1-0
    Traceback (most recent call last):
    File "process_data.py", line 174, in
    main()
    File "process_data.py", line 170, in main
    gen_board_pair_data(datafile, 'training_data')
    File "process_data.py", line 76, in gen_board_pair_data
    while not node.is_end():
    AttributeError: 'Game' object has no attribute 'is_end

my branch is here
https://github.com/johndpope/AdversarialChess

TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

Traceback (most recent call last): File "train_model.py", line 15, in <module> magikarp.train() File "/Users/johndpope/Documents/tensorFlowWorkspace/AdversarialChess/model.py", line 215, in train self.create_model() File "/Users/johndpope/Documents/tensorFlowWorkspace/AdversarialChess/model.py", line 197, in create_model self.create_dis_model() File "/Users/johndpope/Documents/tensorFlowWorkspace/AdversarialChess/model.py", line 187, in create_dis_model self.d_pred_real = self.d_predict(tf.concat(1, [self.person_board_1, self.person_board_2]), self.p_keep) File "/Users/johndpope/miniconda2/envs/tensorflow-p2/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1029, in concat dtype=dtypes.int32).get_shape( File "/Users/johndpope/miniconda2/envs/tensorflow-p2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 639, in convert_to_tensor as_ref=False) File "/Users/johndpope/miniconda2/envs/tensorflow-p2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 704, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "/Users/johndpope/miniconda2/envs/tensorflow-p2/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 113, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "/Users/johndpope/miniconda2/envs/tensorflow-p2/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 102, in constant tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape)) File "/Users/johndpope/miniconda2/envs/tensorflow-p2/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 370, in make_tensor_proto _AssertCompatible(values, dtype) File "/Users/johndpope/miniconda2/envs/tensorflow-p2/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 302, in _AssertCompatible (dtype.name, repr(mismatch), type(mismatch).__name__)) TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

was there a specific tensorflow version you used?

TypeError: Expected int32, got list containing Tensors of type '_Message' instead

After doing python process_data.py using ../Data/GM2001.pgn the next step in the README.md fails:

$ ls ../Data/
-rw-r--r-- 1 lila lila    49530521 Feb 26 08:34 GM2001.pgn
-rw-rw-r-- 1 lila lila 11946358296 Feb 28 00:51 training_data.hdf5
-rw-rw-r-- 1 lila lila   134512600 Feb 28 00:57 player_data.hdf5
-rw-rw-r-- 1 lila lila   452653274 Feb 28 00:59 full_boards.pkl

$ uname -a
Linux dugovic-host 4.4.0-64-generic #85-Ubuntu SMP Mon Feb 20 11:50:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ python train_model.py 
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Traceback (most recent call last):
  File "train_model.py", line 14, in <module>
    magikarp = Magikarp(config, sess)
  File "/home/lila/AdversarialChess/model.py", line 18, in __init__
    self.p_data = h5py.File(config['p_datafile'], 'r')
  File "/home/lila/.local/lib/python2.7/site-packages/h5py/_hl/files.py", line 272, in __init__
    fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
  File "/home/lila/.local/lib/python2.7/site-packages/h5py/_hl/files.py", line 92, in make_fid
    fid = h5f.open(name, flags, fapl=fapl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/tmp/pip-4rPeHA-build/h5py/_objects.c:2684)
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/tmp/pip-4rPeHA-build/h5py/_objects.c:2642)
  File "h5py/h5f.pyx", line 76, in h5py.h5f.open (/tmp/pip-4rPeHA-build/h5py/h5f.c:1930)
IOError: Unable to open file (Unable to open file: name = '../data/tal_data.hdf5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.