Life In 19x19 http://lifein19x19.com/ |
|
This 'n' that http://lifein19x19.com/viewtopic.php?f=12&t=12327 |
Page 39 of 53 |
Author: | Bill Spight [ Mon Aug 10, 2020 6:17 am ] |
Post subject: | Re: This 'n' that |
Tryss wrote: All in all, I don't see how iterative deepening help in these kind of situations compared to a Depth-first search with backtracking. To truly solve a problem like this, you need to fully explore all the branch of the tree, it doesn't matter in what order. You don't need to fully explore all branches of the tree. Thank goodness! There is a whole branch of computer science literature aimed at improving upon brute force depth first search. This is a small problem, with only 5 possibilities for the first move. 4 of them are wrong. With bad luck you could explore all 4 failing branches before hitting upon the path to the solution. Iterative deepening assures that you will always go down the right path at every level of depth. You won't spend a lot of time on failing paths at greater depths than the shallowest solution. It turns out that this example is not a good one to show the advantage of iterative deepening, because the solution is at depth 5. But that was not my purpose. I meant to show a way to achieve systematic thoroughness in the calculation of variations. And as I said, I don't know of anyone who actually recommends it for humans in actual play. |
Author: | John Fairbairn [ Mon Aug 10, 2020 6:17 am ] |
Post subject: | Re: This 'n' that |
Quote: All in all, I don't see how iterative deepening help in these kind of situations compared to a Depth-first search with backtracking. My take on what Bill was suggesting is this: Humans (amateurs at any rate) have a built-in propensity to do a depth-first search in any situation. When fighting wild animals or growing corn, that may be biologically the best policy, but in go it is full of pitfalls. The commonest - and I don't believe anyone reading this forum has never fallen in this pit - is to find a quick answer and to stop there. Turn the page and the pro explains various other wrinkles such as ko that you did not even look for. Iterative deepening (perhaps not the ideal term here, as it tempts people to read computer science into it) seems a cheap way to ensure all (or most) alternatives are looked at. You could maybe get the same effect by backtracking, but the human brain seems to find it harder to keep track that way. Cue Irish joke which I'm sure Bill will appreciate: American tourist lost in Portlaoise asks native how to get to Dublin. Wise old native sucks on pipe and says, "well, if I was you I wouldn't start from here." |
Author: | Bill Spight [ Mon Aug 10, 2020 6:27 am ] |
Post subject: | Re: This 'n' that |
John Fairbairn wrote: Cue Irish joke which I'm sure Bill will appreciate: American tourist lost in Portlaoise asks native how to get to Dublin. Wise old native sucks on pipe and says, "well, if I was you I wouldn't start from here." American version: But first, an aside. I read years ago that, in one form or other, one of the most widespread jokes across human cultures is the riddle, "Why did the chicken cross the road?" Anyway, in the American version, a tourist is lost in Maine and asks an elderly gentleman how to get to, let us say, Boston. The elderly gentlman, who also smokes a pipe, takes it out of his mouth and says, "You can't get theah from heah." |
Author: | Tryss [ Mon Aug 10, 2020 6:50 am ] |
Post subject: | Re: This 'n' that |
Bill Spight wrote: This is a small problem, with only 5 possibilities for the first move. 4 of them are wrong. With bad luck you could explore all 4 failing branches before hitting upon the path to the solution. Iterative deepening assures that you will always go down the right path at every level of depth. You won't spend a lot of time on failing paths at greater depths than the shallowest solution. So you will stop once you found a solution? I believed that the goal was fully reading all the variations, and not just finding one line that works. |
Author: | Bill Spight [ Mon Aug 10, 2020 7:36 am ] |
Post subject: | Re: This 'n' that |
Tryss wrote: Bill Spight wrote: This is a small problem, with only 5 possibilities for the first move. 4 of them are wrong. With bad luck you could explore all 4 failing branches before hitting upon the path to the solution. Iterative deepening assures that you will always go down the right path at every level of depth. You won't spend a lot of time on failing paths at greater depths than the shallowest solution. So you will stop once you found a solution? I believed that the goal was fully reading all the variations, and not just finding one line that works. As I said, my goal here was to illustrate a method to achieve systematic thoroughness for study and training purposes. In this case there is little difference between brute force depth first search and iterative deepening, because the solution is at close to maximum depth. Here is a problem where the maximum depth is around 13, I think, maybe even 15. I peeked at the solution, and it has a depth of around 6 or 7. Even if you didn't have the bad luck to pick the correct play last, you could spend a very long time on failing paths to relatively great depths. And since they are erroneous paths, how much light would they shed on the actual problem? It's not helpful to go too far afield. |
Author: | Tryss [ Mon Aug 10, 2020 7:53 am ] |
Post subject: | Re: This 'n' that |
I guess my point can be resumed by : how do you know they are erroneous path if you don't explore them? |
Author: | Bill Spight [ Mon Aug 10, 2020 8:45 am ] |
Post subject: | Re: This 'n' that |
Tryss wrote: I guess my point can be resumed by : how do you know they are erroneous path if you don't explore them? With iterative deepening, you know when you find the solution at a certain depth. Edit: I.e., you do explore them, but only to the depth of the shallowest solution. And, like in this problem, you may be able to disprove a play at a shallower depth. All first moves but one were disproved at depth 4, although the solution has depth 5. That's for problems, anyway. For actual games, where you may never know the right path, then the general arguments for iterative deepening apply. Not that humans should use it in actual play, OC. |
Author: | Bill Spight [ Tue Aug 11, 2020 8:27 am ] |
Post subject: | Re: This 'n' that |
Iterative broadening Aha! It was Knotwilg's topic, Complexity as width x depth ( https://www.lifein19x19.com/viewtopic.php?f=15&t=17682 ) that got me thinking, if you can iteratively increase the depth, why not iteratively increase the width? OC, there is literature on that, first by Matt Ginsberg three decades ago, with his paper, Iterative broadening ( https://www.aaai.org/Papers/AAAI/1990/AAAI90-033.pdf ), and also by Tristan Cazenave, with Iterative widening ( http://www.lamsade.dauphine.fr/~cazenav ... s/iw00.pdf ), which he developed further in Generalized widening ( http://www.lamsade.dauphine.fr/~cazenav ... openld.pdf ). Now, both are concerned with computerized search — Ginsberg says that iterative broadening is effective with more than 40,000 nodes —, but maybe either approach can be effectively adapted to human use. Ginsberg's basic idea is to start with a narrow search, like width 2, to variable depth, and if you don't find a solution or good answer, increase the width. Cazenave's basic idea is to start with a minimal set of moves and do an iterative depth first search with them, widening the set if the search is unsuccessful. He has successfully applied it to open life and death problems in go with as many as 20 possible moves. I haven't really studied Cazenave's papers, as his ideas are rather more elaborate than I have indicated. But I think I get Ginsberg's idea well enough to apply it to our little problem. Ginsberg makes the following analogy. You are trying to buy a birthday present for a friend, a woman who likes horses. So you decide to buy her a book about Tennessee walking horses. After going to a few book stores and even a tack shop or two, without finding such a book. At this point you may decide to stop looking for that book and try something else. His point is this. Suppose that the solution set is evenly distributed over the leaves of the search tree. Then depth first search (with backtracking) is as good as anything. But if the set is unevenly distributed, then not finding a solution after looking in a few leaves of a certain branch of the tree, even though it has not been exhaustively searched, is evidence that it is in a different branch. So you search narrowly, and if fail to find a solution, you broaden the search. Iterative broadening. Ginsberg makes the point that if there is only one solution, which has an equal chance of being on any leaf, iterative broadening is no help. However, if you have heuristics that increases the probability that the solution lies in a certain branch, then failing to find the solution in that branch reduces the probability, and may justify switching to another branch. Next I shall apply that idea to our problem. |
Author: | John Fairbairn [ Tue Aug 11, 2020 8:55 am ] |
Post subject: | Re: This 'n' that |
Can someone please remind me of the very old tsumego heuristic where you assume one player can have two moves on a row. I've never actually tried using it, but from what I recall (very vaguely) it should work as a tool in iterative broadening, no? |
Author: | Bill Spight [ Tue Aug 11, 2020 10:57 am ] |
Post subject: | Re: This 'n' that |
John Fairbairn wrote: Can someone please remind me of the very old tsumego heuristic where you assume one player can have two moves on a row. I've never actually tried using it, but from what I recall (very vaguely) it should work as a tool in iterative broadening, no? Null move heuristic? |
Author: | John Fairbairn [ Tue Aug 11, 2020 1:37 pm ] |
Post subject: | Re: This 'n' that |
Quote: Null move heuristic? I haven't heard that term in the context I'm talking about (tsumego), but in any case it's not the term I'm after, it's the actual application. Is it for killing, or living, or both, is it a first-move or any-move technique? I've never actually used so I have no in-built memory of it. Edit: Found it here! https://lifein19x19.com/viewtopic.php?f=15&t=16066 |
Author: | Bill Spight [ Tue Aug 11, 2020 2:41 pm ] |
Post subject: | Re: This 'n' that |
Thanks for the reminder, John. |
Author: | Bill Spight [ Tue Aug 11, 2020 3:20 pm ] |
Post subject: | Re: This 'n' that |
Progressive narrowing I have taken another look at the topic John referenced. https://lifein19x19.com/viewtopic.php?f=15&t=16066 It now seems to me that this heuristic, when it works, is a way of narrowing the search, not broadening it. In a problem or position of any appreciable difficulty, there will normally be more than three possibly relevant moves. And then I thought about iterative deepening at depth 1. Really? Who does that? Well, who does that consciously? Harkening back to Kotov's method in Think Like a Grandmaster, he started with identifying candidate moves. How did he do that? Among all of the possible moves on the chess board, some of them stood out, based upon knowledge, experience, and intuition. He had probably also learned some conscious heuristics, like look at checks or look at sacrifices. It now strikes me that looking over the whole board and letting moves stand out to us is a way of unconsciously doing a depth 1 search that would take too much time, effort, and working memory to do consciously. And sometimes you see deeper than 1 move. Then you follow up with a narrower conscious search. |
Author: | Bill Spight [ Tue Aug 11, 2020 8:03 pm ] |
Post subject: | Re: This 'n' that |
A look at the heuristic The heuristic, copied from that topic. zermelo wrote: The 3-move tsumego rule: Assume that the problem is black to kill. Now let A, B, C be such intersections that if white would start at A, the only way for black to kill with 2 moves would be playing both B and C. Now the solution to the original problem has to start with black play at A, B, or C. If , both of are necessary to kill. So must be one of these. Ditto. The only common point is A-17, so must play there. This is not actually a case, because . . . This also kills, because of White's shortage of liberties. This is also not a case. This also kills. Finally. If , White lives, even if Black plays two moves in a row. must be at A-17. All of this information is available after depth first search at depth 3, except the necessity of both Black stones, given . We can check that, however, with another White play, i.e., with a depth 4 sequence. To do so we do not have to do a full depth 4 search. (If neither is necessary, then White will die at depth 3, given and two different Black plays.) Assuming that we recognize that White is dead without further search, we can check whether is necessary, given , by the following sequence. And we can check whether is necessary, given with the following sequences. Edit: I realized that we have to check both plays for . Neither of these depth 4 sequences fits neatly into the category of iterative deepening or iterative broadening, although the verification sequence is one step deeper and one step wider. Now to check whether is necessary, given . Edit: Added later. is necessary, given . The only point common to both triplets is A-17, which must then be Black's first move. We discovered that with only five (Edit: I can't count. ) sequences at depth 4. When this happens it is a more efficient way to discover Black's first move than iterative deepening, which requires several depth 4 sequences. Edit: Note that we cannot check necessity simply by changing the color of the Black stones. For instance: |
Author: | Bill Spight [ Wed Aug 12, 2020 4:21 am ] |
Post subject: | Re: This 'n' that |
Generalizing the heuristic We can generalize the heuristic to any goal. For instance, suppose that White to play can live. Then: Let A, B, C be such intersections that if Black would start at A, the only way for White to live with 2 moves would be playing both B and C. Now White to live has to start with a play at A, B, or C. Now let's apply that to the position after at A-17 in our little problem. Only way to make a second eye, given . Only way to make a second eye, given . This way kills. Only way to make a second eye, given . This way kills. Only way to make a second eye, given . By inspection, no play belongs to all four triplets. Therefore there is no play by which White lives. (Also by inspection, there is no ko.) White is dead. QED. What?! What do you mean, QED? We already know (assume) that Black to play can prevent White from living without ko. The question is how does Black play to do that? OK. Calm down. The information is there. For instance: Suppose that White plays . What is the triplet to live that does not contain ? This is it. The Black stone tells Black where to play. Bingo! Likewise: Where should Black play? This triplet does not contain . Play at . Bingo! The Black replies to the other two White plays are obvious, but the same method works. Is this superior to iterative deepening? Well, maybe. It performs less search, because the two necessary stones do not dictate move order. And, OC, the second move in each sequence remains the same. However, the comparison of triplets is not something that the search algorithm does. This 'n' that. |
Author: | Bill Spight [ Sat Aug 15, 2020 10:04 am ] |
Post subject: | Re: This 'n' that |
More thoughts on the heuristic Here is the problem, again. Now suppose that White announces a strategy to play at B-16 (if possible), whatever Black may play. OC, this strategy will fail, because this is a problem. Black thwarts White's strategy with and . And, we believe, and , in either order, is the only way to kill White, given . That means that succeeds against every other choice for . We know from a previous variation that because of the capture, can pass and still live. What this method does, then, is to branch the game tree, not on , but on . Also, the proof that at A-16 or C-16 fails, which is the point of the heuristic, is the demonstration that White's strategy succeeds against those plays. This simplifies the question from one of finding one White play and then two Black plays that are necessary for Black to succeed to finding a White strategy for that effectively prunes the game tree by eliminating options for . Consider, then, this strategy for . How effective is this strategy? at D-17 fails. at C-16 fails. at B-16 fails. And, by transposition, at A-16 fails. Note that Black plays and in order, to avoid having to read transpositions. This demonstrates that White's strategy of playing at A-17 succeeds against all other plays for . must be at A-17. OC, in real life a solver would not read out all of these variations, but would know or see that White is alive. I just posted them for completeness. This is a different way of exploring the game tree than just reading the moves in order. If you can find a good enough strategy for White you can prune moves for Black quite effectively. |
Author: | Bill Spight [ Sat Aug 15, 2020 11:33 am ] |
Post subject: | Re: This 'n' that |
Here is an easy tsumego problem from Michael Redmond's channel. OK. What is a good strategy for ? Does that work? Not the best yose, but lives. prevents the one point eye at , but lives this way, too. (By transposition, succeeds against at 3.) What is a good strategy for ? White's only chance to make a second eye fails after . Any other pair of White stones leaves White with one eye and a dead shape. The same is true if simply connects at D-18. BTW, using two White moves to escape is not kosher. What's a good strategy for ? The rest is easy. The method of finding a good second move strategy works well for this problem. |
Author: | Bill Spight [ Sun Aug 16, 2020 7:32 am ] |
Post subject: | Re: This 'n' that |
Let's try out this method on Xuanxuan Qijing problem 118. What's a good strategy for ? How about this? It does no good for Black to make an eye. White wins the semeai. This looks like the best Black can do. The rest I know/see. at 4 That seems to be the best that Black can do against White's strategy. That means that should be at 1, 2, or 3 in this variation. Since this is a problem, White should not be able to live outright and avoid the ko. For instance: If blocks to avoid the ko, White dies. takes away White's potential eye, and then takes away Black's potential eye. This variation also shows that is not a good reply if is at 3. If takes away White's potential eye, takes away Black's potential eye. lays a trap. If captures, White loses a liberty and wins the semeai. plays atari. The rest I know/see. makes two eyes, despite the fact that the stones are in atari. This is a result of the special properties of the corner. Something to know/see. If captures two stones, throws in at . leaving the next diagram. Solution: OC, could also be at 3 and could also be at 4. lays a trap for Black to play at 4. The cook did not bother problem composers of yore. The method works for this position, telling us that should be at a, b, or c. But that's fairly obvious, anyway. |
Author: | Bill Spight [ Mon Sep 07, 2020 1:58 pm ] |
Post subject: | Re: This 'n' that |
The board as a storage device Tryfon Gavriel, who, under the name, Kingscrusher, runs chessworld.net and who, over many years, has posted and commented on a prodigious number of chess games on youtube, posted this game, https://www.youtube.com/watch?v=nlYbDeophsU , between Leela Chess Zero (LC0) and Stockfish earlier this year, in which he talks about the chess board as a storage device. Kingscrusher quotes Steinitz: Wilhelm Steinitz wrote: The task of the positional player is systematically to accumulate slight advantages and try to convert temporary advantages into permanent ones LC0 is a positional player, as, I gather, are all or nearly all neural network chess players. In his commentary on the game, Kingscrusher points out longlived advantages that Leela accumulates and holds on to, finally winning after around 180 moves. (BTW, it was not clear to me from his commentary that those early advantages were enough to win without later mistakes by Stockfish.) What about the go board as a storage device which preserves slight permanent advantages? Well, ko stones aside, despite sacrifices and furikawari, most stones played on the go board are alive at the end of the game and, if they are well placed, represent persistent advantages. OC, these advantages are not always secure territory, especially in the opening, although they may be represented as expected territory. Nothing special needs to be done to create persistent advantages on the go board, and a slight advantage is all that it takes to win the game. When I was learning go, it had the reputation of being a more strategical game than chess, and I think that the fact that go stones do not move has a lot to do with that. Since go stones tend to persist on the board, so do any advantages that they have gained. Of course, among top players there are those who have a more positional style, such as Takagawa, and those who have a more tactical style, such as Sakata. For Takagawa, in fact, the ideal was to win without fighting. He may well have gone too far in that direction, but it seems to me that go is basically a positional game. |
Author: | gowan [ Mon Sep 07, 2020 2:38 pm ] |
Post subject: | Re: This 'n' that |
Bill Spight wrote: The board as a storage device Tryfon Gavriel, who, under the name, Kingscrusher, runs chessworld.net and who, over many years, has posted and commented on a prodigious number of chess games on youtube, posted this game, https://www.youtube.com/watch?v=nlYbDeophsU , between Leela Chess Zero (LC0) and Stockfish earlier this year, in which he talks about the chess board as a storage device. Kingscrusher quotes Steinitz: Wilhelm Steinitz wrote: The task of the positional player is systematically to accumulate slight advantages and try to convert temporary advantages into permanent ones LC0 is a positional player, as, I gather, are all or nearly all neural network chess players. In his commentary on the game, Kingscrusher points out longlived advantages that Leela accumulates and holds on to, finally winning after around 180 moves. (BTW, it was not clear to me from his commentary that those early advantages were enough to win without later mistakes by Stockfish.) What about the go board as a storage device which preserves slight permanent advantages? Well, ko stones aside, despite sacrifices and furikawari, most stones played on the go board are alive at the end of the game and, if they are well placed, represent persistent advantages. OC, these advantages are not always secure territory, especially in the opening, although they may be represented as expected territory. Nothing special needs to be done to create persistent advantages on the go board, and a slight advantage is all that it takes to win the game. When I was learning go, it had the reputation of being a more strategical game than chess, and I think that the fact that go stones do not move has a lot to do with that. Since go stones tend to persist on the board, so do any advantages that they have gained. Of course, among top players there are those who have a more positional style, such as Takagawa, and those who have a more tactical style, such as Sakata. For Takagawa, in fact, the ideal was to win without fighting. He may well have gone too far in that direction, but it seems to me that go is basically a positional game. I don't play chess much now but 20 years before I became a go player, when I was a teenager, I was an avid chess player. Now I play only with my nephew. The games usually follow a pattern of my getting a space advantage, which leads to a material advantage and then I trade off until I can convert a pawn into a queen, the material advantage results in a direct mating attack. Reading your post, it occurred to me that in chess a space advantage is positional. In go maybe overconcentration would be the analog of space in chess. |
Page 39 of 53 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |