baduk

Is there a good data structure that performs find, union, and de-union?

馋奶兔 提交于 2020-01-02 08:33:52
问题 I am looking for a data structure that can support union, find, and de-union fairly efficiently (everything at least O(log n) or better) as a standard disjoint set structure doesn't support de-unioning. As a background, I am writing a Go AI with MCTS [http://en.wikipedia.org/wiki/Monte_Carlo_tree_search], and this would be used in keeping track of groups of stones as they connect and are disconnected during backtracking. I think this might make it easier as de-union is not on some arbitrary

OpenCV detect square with difficult background

久未见 提交于 2019-12-23 22:16:46
问题 i am working on an Android app that will recognize a GO board and create a SGF file of it. i need to detect the whole board in order to warp it and to be able to find the correct lines and stones like below. (source: eightytwo.axc.nl) right now i use an Opencv RGB Mat and do the following: separate the channels canny the separate channels Imgproc.Canny(channel, temp_canny, 30, 100); combine (bitwise OR) all channels. Core.bitwise_or(temp_canny, canny, canny); find the board contour Still i am

WPF drawing performance with large numbers of elements

坚强是说给别人听的谎言 提交于 2019-12-10 13:53:50
问题 I'm trying to create a custom control in WPF to display the game tree for a game of go (see here for what it looks like). I've more-or-less got it working laying out the nodes, but one problem I've found is that it begins gets noticeably slow to render/navigate (it's in a scroll viewer) when the number of nodes gets larger than about 30. Since an average game of go consists of around 200 moves (not to mention other branches that the player might fork onto), this is going to be a fairly big

Is there a good data structure that performs find, union, and de-union?

六月ゝ 毕业季﹏ 提交于 2019-12-05 22:10:36
I am looking for a data structure that can support union, find, and de-union fairly efficiently (everything at least O(log n) or better) as a standard disjoint set structure doesn't support de-unioning. As a background, I am writing a Go AI with MCTS [ http://en.wikipedia.org/wiki/Monte_Carlo_tree_search] , and this would be used in keeping track of groups of stones as they connect and are disconnected during backtracking. I think this might make it easier as de-union is not on some arbitrary object in the set, but is always an "undo" of the latest union. I have read through the following

OpenCV different approach on detecting go board

断了今生、忘了曾经 提交于 2019-12-04 12:27:55
问题 i am working on an Android app that will recognize a GO board and create a SGF file of it. i made a version that is able to detect a board and warp the perspective to make it square ( code and example image below) unfortunately it gets a bit harder when adding stones.(image below) Important things about a average go board: round black and white stones black lines on the board board color ranges from white to light brown and sometimes with a wood grain stones are placed on intersections of two