It is currently Tue Sep 02, 2025 2:00 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
Offline
 Post subject: Kombilo 0.7 released
Post #1 Posted: Sun Mar 25, 2012 1:27 am 
Dies in gote
User avatar

Posts: 63
Liked others: 0
Was liked: 40
After a long break, a new Kombilo release is available. It is overall faster and has several new features (search for move sequences, search in variations, date profile, tags for games, use of multi-core processors ...).

On the downside, at the moment it will work only on Linux out of the box. While Kombilo was developped with cross-platform tools and in principle should work on Windows and Mac OS X, I was not able to test this, and experience tells that some fiddling will be required to get going. Reports from Pythonistas who succeed in building it on Windows/Mac will be appreciated (as well as reports from Linux people, of course).

See http://www.u-go.net/kombilo/ for further details and instructions. The documentation is also available online at http://dl.u-go.net/kombilo/doc/.

Best regards

Ulrich

_________________
u-go.net


This post by ugoertz was liked by: Redbeard
Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #2 Posted: Sun Mar 25, 2012 3:47 am 
Gosei
User avatar

Posts: 1585
Location: Barcelona, Spain (GMT+1)
Liked others: 577
Was liked: 298
Rank: KGS 5k
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
Hi Ulrich, Mac OS here. After wrestling with my Pythons (I have 2.6, 7, 3 and 3.1), I end up with


Code:
Traceback (most recent call last):
  File "src/kombilo.py", line 47, in <module>
    from kombiloNG import *
  File "/Users/ruben/Downloads/ZIPS/kombilo/src/kombiloNG.py", line 46, in <module>
    import libkombilo as lk
  File "/Users/ruben/Downloads/ZIPS/kombilo/src/libkombilo.py", line 25, in <module>
    _libkombilo = swig_import_helper()
  File "/Users/ruben/Downloads/ZIPS/kombilo/src/libkombilo.py", line 17, in swig_import_helper
    import _libkombilo
ImportError: No module named _libkombilo


This does not look like a fault in my pythons...

Edit: forgot the last error line... the relevant one :D

_________________
Geek of all trades, master of none: the motto for my blog mostlymaths.net

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #3 Posted: Sun Mar 25, 2012 4:33 am 
Dies in gote
User avatar

Posts: 63
Liked others: 0
Was liked: 40
Hi,

RBerenguel wrote:
Hi Ulrich, Mac OS here. After wrestling with my Pythons (I have 2.6, 7, 3 and 3.1), I end up with


Code:
Traceback (most recent call last):
ImportError: No module named _libkombilo


This does not look like a fault in my pythons...


The right Python version for Kombilo is 2.7. I guess I should state this somewhere explicitly ...

About the ImportError: The libkombilo extension is missing so far. This is the C++ extension module which handles the pattern search. Did you try to compile it? In the lk subdirectory, you could try

Code:
python setup.py build_ext


This will depend on (at least) the presence of the g++ compiler, the python development and sqlite3-dev libraries. I do not know much about Mac OS X, but since it is unix based, all these might be available without too much pain. (If you cloned the mercurial repository rather than using the tar.gz archive, you will have to use SWIG before.) See the notes in the documentation starting at http://dl.u-go.net/kombilo/doc/manual.html#libkombilo for a few more details.


If the python setup.py build_ext did run through, the only thing left to do is to copy the _libkombilo.so in lk/build/lib.SOMETHING/ to the src subdirectory (and also copying lk/libkombilo.py to src/ if you cloned the repository and ran SWIG yourself).


It would be great if you made this work!

One more note: see http://dl.u-go.net/kombilo/doc/manual.html#the-kombilo-cfg-configuration-file how to deal with the situation of having only one mouse button.


Best,

Ulrich

_________________
u-go.net

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #4 Posted: Sun Mar 25, 2012 6:25 am 
Lives in gote

Posts: 589
Liked others: 0
Was liked: 114
Rank: 2 dan
Quote:
This will depend on (at least) the presence of the g++ compiler, the python development and sqlite3-dev libraries. I do not know much about Mac OS X, but since it is unix based, all these might be available without too much pain.


Apple's 'developer tools', which most obviously is their IDE 'xcode', include the gcc and g++ compilers, plus other stuff you tend to need like make. Without these, it's a massive pain trying to do anything, but it should be possible to download xcode via the app store if you're on OSX 10.7. If you're still on 10.6 and don't already have them, xcode should be available on your original install cds/dvds, but otherwise it's annoyingly difficult to get it.

Also, Apple's gcc/g++ are a little different to the pure GNU ones, and I don't know enough to know how important the difference is (other than that it breaks my code...). There are GNU versions are available at http://hpc.sourceforge.net/, which may work better.

And finally, kombilo is excellent, thanks for the new release :)

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #5 Posted: Sun Mar 25, 2012 7:53 am 
Gosei
User avatar

Posts: 1585
Location: Barcelona, Spain (GMT+1)
Liked others: 577
Was liked: 298
Rank: KGS 5k
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
Almost... got it. Compiled the .so correctly (needed to copy the header files for boost, since I was totally unable to find them). After compiling libkombilo and copying the .so, I replaced the libkombilo.py in src/ for the one in lk, since I had run swig and I had some swig complaint. Then I ran kombilo... X11 started... And segmentation fault. Oh well. Almost there...

_________________
Geek of all trades, master of none: the motto for my blog mostlymaths.net

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #6 Posted: Sun Mar 25, 2012 11:08 am 
Dies in gote
User avatar

Posts: 63
Liked others: 0
Was liked: 40
RBerenguel wrote:
Almost... got it. Compiled the .so correctly (needed to copy the header files for boost, since I was totally unable to find them). After compiling libkombilo and copying the .so, I replaced the libkombilo.py in src/ for the one in lk, since I had run swig and I had some swig complaint. Then I ran kombilo... X11 started... And segmentation fault. Oh well. Almost there...


Hmmm ... that's too bad. To narrow down the problem, you could try, in a directory where you have libkombilo.py and _libkombilo.so, to start python and do:

Code:
Python 2.7.2+ (default, Oct  4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libkombilo
>>> gl = libkombilo.GameList('abc')
>>>


Here abc should be a non-existing file name. (This should create the file abc.) If this works, then it looks as if the segfault is not related to the libkombilo extension but to something else.

Another thing you could try, if you are willing to dig into this, is to compile only the C++ program. In the lk/examples directory, there is a program cpptest.cpp. You will have to edit the path in line 11. This should be the name of a directory containing some sgf files. Then compile using:

Code:
g++ -Wall -g -O0 -o cpptest cpptest.cpp ../search.cpp ../sgfparser.cpp ../algos.cpp ../abstractboard.cpp ../pattern.cpp -lsqlite3 -lboost_system -lboost_filesystem


You will need the boost-system and boost-filesystem libraries for this. You could also use the Makefile to compile, but the above line leaves out the parallelization of the code - this is probably a good idea for testing.

You can then run

Code:
./cpptest -p


to "process" the games in the specified directory and run some searches on it.


In fact, maybe it is worth trying to discard the parallelization for the Python extension as well. To do this, in the lk/setup.py delete the '-fopenmp' item in line 8, and delete line 9 (extra_link_args ...) entirely. Then run python setup.py build_ext again, and copy the new _libkombilo.so to src/.

Best

Ulrich

_________________
u-go.net

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #7 Posted: Sun Mar 25, 2012 11:42 am 
Gosei
User avatar

Posts: 1585
Location: Barcelona, Spain (GMT+1)
Liked others: 577
Was liked: 298
Rank: KGS 5k
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
Libkombilo passed the first test, so I assume the .so is correct (on first try at least...) It generated abc, abc1 and abc2 files in the directory, only one of them has anything (abc), it's an sqlite database (I guess you knew).

I can't read very well Apple Crash reports, but the last "thing" going around is related to Tkinter:

Code:
Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   Tk                               0x000000010225eccd Tk_GetImageMasterData + 18

There are a few more threads in this list (40)

I guess now we could go the crappy way and add "prints" to the code trying to pinpoint the faulty function... With C I'd just use the gnu debugger or valgrind...

_________________
Geek of all trades, master of none: the motto for my blog mostlymaths.net

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #8 Posted: Mon Mar 26, 2012 2:07 am 
Dies in gote
User avatar

Posts: 63
Liked others: 0
Was liked: 40
Hello,

RBerenguel wrote:
Libkombilo passed the first test, so I assume the .so is correct (on first try at least...) It generated abc, abc1 and abc2 files in the directory, only one of them has anything (abc), it's an sqlite database (I guess you knew).


That sounds good.

Quote:
I can't read very well Apple Crash reports, but the last "thing" going around is related to Tkinter:

Code:
Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   Tk                               0x000000010225eccd Tk_GetImageMasterData + 18

There are a few more threads in this list (40)

I guess now we could go the crappy way and add "prints" to the code trying to pinpoint the faulty function... With C I'd just use the gnu debugger or valgrind...


Let's first try whether the basic Tkinter functionality is there. Could you try the following in a python interpreter, in the src directory?

Code:
Python 2.7.2+ (default, Oct  4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Tkinter import *
>>> from ttk import *
>>> from PIL import Image, ImageTk
>>> import Pmw
>>> root = Tk()
>>> f = Frame(root)
>>> im = ImageTk.PhotoImage(file='./src/icons/mouse.png')
>>> b = Button(image=im)
>>> b.pack()
>>> root.destroy()
>>>


The root = Tk() line should bring up a new window. The b.pack() line should display a button inside the window (and probably shrink the window to the size of the button).

Best,

Ulrich

_________________
u-go.net

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #9 Posted: Mon Mar 26, 2012 2:43 am 
Gosei
User avatar

Posts: 1585
Location: Barcelona, Spain (GMT+1)
Liked others: 577
Was liked: 298
Rank: KGS 5k
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
Gotcha, everything was fine until

Code:
>>> im=ImageTk.PhotoImage(file='./icons/mouse.png')
Segmentation fault


PS: Since I was already in ./src I removed that from the path
PPS: Kombilo05 no longer works, too. PIL to blame?

_________________
Geek of all trades, master of none: the motto for my blog mostlymaths.net


Last edited by RBerenguel on Mon Mar 26, 2012 7:58 am, edited 1 time in total.
Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #10 Posted: Mon Mar 26, 2012 7:57 am 
Gosei
User avatar

Posts: 1585
Location: Barcelona, Spain (GMT+1)
Liked others: 577
Was liked: 298
Rank: KGS 5k
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
An addition is the fact that googling for this particular problem returns a ton of results... And looks like a "known bug", spread across *NIX flavours...

_________________
Geek of all trades, master of none: the motto for my blog mostlymaths.net

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #11 Posted: Mon Mar 26, 2012 10:40 am 
Lives with ko

Posts: 200
Liked others: 38
Was liked: 27
Rank: IGS 2d+
KGS: venkman, M2Brett1
The previous version had the three GUI areas in separate windows, which worked better for me. Now, with a 4:3 monitor, you get a tiny board in the middle with wasted space beneath it, with two vertical panels on either side.

The only information of value on the left side is the display of previous searches. If that could move into one of the tabs on the right (or even be duplicated there), I could hide the left entirely and I'd be happy.

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #12 Posted: Mon Mar 26, 2012 11:34 am 
Dies in gote
User avatar

Posts: 63
Liked others: 0
Was liked: 40
RBerenguel wrote:
Gotcha, everything was fine until

Code:
>>> im=ImageTk.PhotoImage(file='./icons/mouse.png')
Segmentation fault




OK, so now we know more precisely what causes this problem ... I also found some reports about this, but no solution ...


Quote:
PPS: Kombilo05 no longer works, too. PIL to blame?


Maybe there is one more thing we could try. In Kombilo05, in the file board1.py, could you delete line 35 (import ImageTk) and try whether it works? You will not get the nice stones, but if ImageTk is the only problem, then for the icons I could work around it.

Best,

Ulrich

_________________
u-go.net

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #13 Posted: Mon Mar 26, 2012 11:38 am 
Dies in gote
User avatar

Posts: 63
Liked others: 0
Was liked: 40
crux wrote:
The previous version had the three GUI areas in separate windows, which worked better for me. Now, with a 4:3 monitor, you get a tiny board in the middle with wasted space beneath it, with two vertical panels on either side.

The only information of value on the left side is the display of previous searches. If that could move into one of the tabs on the right (or even be duplicated there), I could hide the left entirely and I'd be happy.


Thanks for the feedback. I am still not sure which window layout works best for me, so this comment is very helpful. For some reason I had problems with the separate windows, in particular saving the size and position of the "data window".

So it seems better to move the search history to the middle column, below the board? That would be easy to do.

Best,

Ulrich

_________________
u-go.net

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #14 Posted: Mon Mar 26, 2012 11:42 am 
Gosei
User avatar

Posts: 1585
Location: Barcelona, Spain (GMT+1)
Liked others: 577
Was liked: 298
Rank: KGS 5k
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
After a full system (system=MacPorts) upgrade, no luck. The image part coming from PIL causes a segmentation fault :( Now I don't even have kombilo05 :_(

_________________
Geek of all trades, master of none: the motto for my blog mostlymaths.net

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #15 Posted: Mon Mar 26, 2012 12:26 pm 
Dies in gote
User avatar

Posts: 63
Liked others: 0
Was liked: 40
ugoertz wrote:
RBerenguel wrote:
PPS: Kombilo05 no longer works, too. PIL to blame?


Maybe there is one more thing we could try. In Kombilo05, in the file board1.py, could you delete line 35 (import ImageTk) and try whether it works? You will not get the nice stones, but if ImageTk is the only problem, then for the icons I could work around it.


One more suggestion which should avoid the use of PIL entirely: If in Kombilo05, in the file board1.py you delete not only line 35, but all of lines 32 to 38 (try: ... pass), and then start the v.py script - does it work and can you place stones on the board?

Best regards

Ulrich

_________________
u-go.net

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #16 Posted: Mon Mar 26, 2012 1:19 pm 
Gosei
User avatar

Posts: 1585
Location: Barcelona, Spain (GMT+1)
Liked others: 577
Was liked: 298
Rank: KGS 5k
KGS: RBerenguel
Tygem: rberenguel
Wbaduk: JohnKeats
Kaya handle: RBerenguel
Online playing schedule: KGS on Saturday I use to be online, but I can be if needed from 20-23 GMT+1
ugoertz wrote:
ugoertz wrote:
RBerenguel wrote:
PPS: Kombilo05 no longer works, too. PIL to blame?


Maybe there is one more thing we could try. In Kombilo05, in the file board1.py, could you delete line 35 (import ImageTk) and try whether it works? You will not get the nice stones, but if ImageTk is the only problem, then for the icons I could work around it.


One more suggestion which should avoid the use of PIL entirely: If in Kombilo05, in the file board1.py you delete not only line 35, but all of lines 32 to 38 (try: ... pass), and then start the v.py script - does it work and can you place stones on the board?

Best regards

Ulrich


This does the trick for kombilo05! :) I liberally commented the try-pass-except blocks including the troublesome PhotoImage, and now I can at least load kombilo07! It takes an incredible long time to load (around 1 minute I think), but looks like a working version. I only need to learn to use it (and also I need to find a set of pro games), this was the point of having kombilo05.... And now 07 too :)

_________________
Geek of all trades, master of none: the motto for my blog mostlymaths.net

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #17 Posted: Mon Mar 26, 2012 2:15 pm 
Lives with ko

Posts: 200
Liked others: 38
Was liked: 27
Rank: IGS 2d+
KGS: venkman, M2Brett1
ugoertz wrote:
So it seems better to move the search history to the middle column, below the board? That would be easy to do.

I was thinking move it into the tabs area (where you have Statistics/Options/Game Info etc. already). If I shrink the left column to zero, the board already occupies the full height of the screen (which is how I like it).

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #18 Posted: Mon Mar 26, 2012 3:03 pm 
Lives with ko

Posts: 200
Liked others: 38
Was liked: 27
Rank: IGS 2d+
KGS: venkman, M2Brett1
Another suggestion: double clicking on a game in the game list should switch focus to the board display so you can navigate the game using cursor keys.

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #19 Posted: Tue Mar 27, 2012 12:16 am 
Dies in gote
User avatar

Posts: 63
Liked others: 0
Was liked: 40
RBerenguel wrote:
This does the trick for kombilo05! :) I liberally commented the try-pass-except blocks including the troublesome PhotoImage, and now I can at least load kombilo07! It takes an incredible long time to load (around 1 minute I think), but looks like a working version. I only need to learn to use it (and also I need to find a set of pro games), this was the point of having kombilo05.... And now 07 too :)


Fine, that's good news. I will make a new version which optionally does not use PIL. (Might take a few days.)

Best regards

Ulrich

_________________
u-go.net

Top
 Profile  
 
Offline
 Post subject: Re: Kombilo 0.7 released
Post #20 Posted: Tue Mar 27, 2012 12:19 am 
Dies in gote
User avatar

Posts: 63
Liked others: 0
Was liked: 40
crux wrote:
ugoertz wrote:
So it seems better to move the search history to the middle column, below the board? That would be easy to do.

I was thinking move it into the tabs area (where you have Statistics/Options/Game Info etc. already). If I shrink the left column to zero, the board already occupies the full height of the screen (which is how I like it).


I see. I will add an option to have the search history as another tab (or should it be below the tabs?).

The other suggestion (double-click takes focus to the board) is also very good.

Best regards

Ulrich

_________________
u-go.net

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group