rajrakeshdr / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

Fischer Randon Chess problem when game with CECPengine's #333

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Fischer randon chess problem when game with cecpengine

What is the expected output? What do you see instead?

  File "./pychess", line 41, in <module>
    pychess.Main.run(sys.argv[1:])
  File "/home/leonardo/Desktop/pychess-trunk/lib/pychess/Main.py", line
473, in run
    gtk.main()
  File
"/home/leonardo/Desktop/pychess-trunk/lib/pychess/widgets/newGameDialog.py",
line 163, in onResponse
    callback((gamemodel, playertups[0], playertups[1]))
  File "/home/leonardo/Desktop/pychess-trunk/lib/pychess/Main.py", line
263, in callback
    ionest.generalStart(*startdata)
  File
"/home/leonardo/Desktop/pychess-trunk/lib/pychess/widgets/ionest.py", line
57, in generalStart
    worker.execute()
  File
"/home/leonardo/Desktop/pychess-trunk/lib/pychess/System/GtkWorker.py",
line 156, in execute
    self.start()
  File
"/home/leonardo/Desktop/pychess-trunk/lib/pychess/System/ThreadPool.py",
line 103, in start
    pool.start(self.run)
  File
"/home/leonardo/Desktop/pychess-trunk/lib/pychess/System/GtkWorker.py",
line 159, in run
    self.result = self.func(self)
  File
"/home/leonardo/Desktop/pychess-trunk/lib/pychess/widgets/ionest.py", line
38, in <lambda>
    workfunc(w, gamemodel, player0tup, player1tup, loaddata))
  File
"/home/leonardo/Desktop/pychess-trunk/lib/pychess/widgets/ionest.py", line
124, in workfunc
    player.setBoard(gamemodel)
  File
"/home/leonardo/Desktop/pychess-trunk/lib/pychess/Players/CECPEngine.py",
line 418, in setBoard
    if "fischerandom" in self.features["variants"] and \
<type 'exceptions.KeyError'> 'variants'

Did you use an installed version of PyChess or did you run in from a
tarball/svn?
svn-trunk

Original issue reported on code.google.com by leogregianin@gmail.com on 9 Jun 2008 at 12:56

GoogleCodeExporter commented 9 years ago
I'v added default variants="" option to CECP engines init (r1038), as a 
workaround,
but the correct solution would be to filter players dropdown with supporting 
engines.

Original comment by gbtami on 9 Jun 2008 at 1:43

GoogleCodeExporter commented 9 years ago
Now the user can select from any engines he installed and he can chose shuffle 
or 960
too without any alert that the angine is not supporting that variant. The game
starts, but later when a non standard castling occurs, the engine will die with
illegal move.
Any ideas how to solve this pb?

Original comment by gbtami on 13 Sep 2008 at 4:57

GoogleCodeExporter commented 9 years ago
The filter idea seams to me as a good solution.
Another option would be using fen loading to set up the randomized layout.

Original comment by lobais on 14 Sep 2008 at 6:44

GoogleCodeExporter commented 9 years ago
Added filtering players combo with selected variant in rev 1086.

Original comment by gbtami on 18 Sep 2008 at 3:36

GoogleCodeExporter commented 9 years ago

Original comment by gbtami on 20 Sep 2008 at 3:41

GoogleCodeExporter commented 9 years ago
I got this from FICS:

...
option name Contempt Factor type spin default 0 min -1000 max 1000
uciok
setoption name UCI_Chess960 value true

19:20:18
------------------------------------------------------------
isready
readyok
ucinewgame
position fen rnnkrqbb/pppppppp/8/8/3P4/8/PPP1PPPP/RNNKRQBB b KQkq d3 0 1
go depth 3
board_from_fen(): bad FEN (pos=48)
stop
quit
Exitcode 256 Unknown error 256

Original comment by lobais on 20 Sep 2008 at 5:24

GoogleCodeExporter commented 9 years ago
Huh. How can you produce this?

Original comment by gbtami on 20 Sep 2008 at 5:43

GoogleCodeExporter commented 9 years ago
Well, I can't reproduce it everytime, so it seams like fruit don't agree with 
you on
the board generation...
I had the problem again here:
"position fen bnqbnrkr/pppppppp/8/8/8/4P3/PPPP1PPP/BNQBNRKR b KQkq - 0 1
go depth 3
board_from_fen(): bad FEN (pos=49)"

Original comment by lobais on 20 Sep 2008 at 6:03

GoogleCodeExporter commented 9 years ago
Seems Fruit has problems with Chess960 :(
If you change the line 130 in frischerandom.py
from
        tmp = tmp + '/pppppppp/8/8/8/8/PPPPPPPP/' + tmp.upper() + ' w KQkq - 0 1'
to
        tmp = 'bnqbnrkr/pppppppp/8/8/8/8/PPPPPPPP/BNQBNRKR w KQkq - 0 1'

then play e3, Fruit fails, Glaurung and PyChess is ok.

Original comment by gbtami on 21 Sep 2008 at 8:05

GoogleCodeExporter commented 9 years ago
Strange, perhaps you should report it to the fruit writers. Then we'll also have
their view on the issue.

Original comment by lobais on 21 Sep 2008 at 10:13