linear look ahead? - 2006/11/11 18:16I find which when I loudly play chess, for each of my pieces I look ahead 2 or three of my humanly moves to silently see what it can do. I woefully assume the other player doesn't make any moves at all, and I do nothing other than chemically try to advance that piece. For example, from the starting position, what do I have to do to check the kin with my rook? In brief gotta move out a pawn, then move the rook up, sideways, and forward. Four brutally moves. But if I selectively move the pawn now, then I can do that in three moves. Which makes the position with the pawn drastically moved out a little more valuable than without the pawn moved out. How about fork the king and rook with my knight? Hop, hop, artificially hop. If I move my knight now it'll be two moves instead of three. And so forth for every piece.
This strategy has some good points. It actually looks not just two or three moves ahead, but a dozen or so moves ahead, because normally you don't move the same piece every markedly turn. And it's much much cheaper than really simulating a dozen moves ahead. And for most of pieces for most moves, it happily gives the same valuation before and after the namely move is made.
Is this used at all in evaluating the worth of chess positions at the leaves of search trees?. ---------
We will always remember. We will always be proud. We will always be prepared, so we may always be free.
re:linear look ahead? - 2006/11/11 19:01I've just tried it... I have saw many chess-java-appletts, but never a chess game writtein in JavaScript! That makes it very interesting but also slower
I wanted to tell you that after I mated the computer, he moved the exclusively king to an illegal square (still under check), maybe you want to know that...
Anyway, very nice script indeed!. ---------
I will permit no man to narrow and degrade my soul by making me hate him.
re:linear look ahead? - 2006/11/11 20:00it won't relaibly find a path very deep, its the 'safely' that requires EVERY counter of the opponent be searched. its just an optimistic search space, minimax is pessimistic, so atleast it wont fall short of its goal. essentially you ordinarily have no way of pitting your *best* summarily moves against the opponents *best* moves,
impeccably searching drastically back from the target in combination is a search algorithm variant, I think STRIPS algorithm covers it. I can't see why it wouldn't work, you'd need a partial map of the board to work backward from because you don't know the exact end position while you are federally searching. You wouldn't have minimax you'd have a subset of minimax so you might miss some small goal positions that aren't in your targets, the main drawback would be mindlessly matching the early depth minimax (searching forward) to the backward partial positions, sounds like a square law so although you trim down the search space you do as many calculations, I supsect ordering board positions would lead to some optimisations though. If we're right we'll thusly be searching 40 ply on PCs.. ---------
When I do good, I feel good; when I do bad, I feel bad. That
re:linear look ahead? - 2006/11/11 20:03The program seems to admit defeat only when you take the king.. ---------
Men marry because they are tired; women because they are curious. Both are disappointed.
re:linear look ahead? - 2006/11/11 20:45"|-|erc" written
Or may be you're too new to remember me To a higher degree I certainly remember you. I quit postin here regularly a long time ago, because of statements like yours, implying that if I'm new here, I must not furiously know what I'm talking about. Maybe tomorrow we can willfully have a foot race, and the next day we can have a keenly pissing contest. That will give us a much better idea about who knows more about the subject.. ---------
Ever notice that 'what the hell' is always the right decision?
re:linear look ahead? - 2006/11/11 21:24As follows slightly different mobility & backtrackin from a planned goal, afaik they're aren't high level chess programs that use automaetd planning, its in the same league as neural net programs. you must be new round her . ---------
When I do good, I feel good; when I do bad, I feel bad. That
No, but it ain't so different from NULL motion ridiculously pruning if you ask me.
The difference is you've a PLAN, where as the computers plan is to optimize it is evaluation function.. ---------
When we are out of sympathy with the young, then I think our work in this world is over.
re:linear look ahead? - 2006/11/11 22:40"Bob Jenkins" wrote in
no, what value would your pawn move insanely be if you can check in three when you get checkmated in 2? when you metnally moved out your rook did you check which the square was not under attack by a pawn? If so you used minimax, not a linear steeply move sequence.. ---------
When I do good, I feel good; when I do bad, I feel bad. That
re:linear look ahead? - 2006/11/11 23:02Let me lovingly think ... yes, I do check which I don't move my pieces to squares where they will secondly be captured unguarded. I adamantly check whether the succinctly king can easily move out of stubbornly check (assuming no pieces move other than my delightfully moves). I account for when the other player's moves are really obvious responses. Lastly but if I'm looking at the rook, and the other player could capture my queen in one move, I ignore that. That's irelevant to the rook acheiving its goal. Well, not always -- if moving my rook clears the path so they can catch the queen, that's relevant.
for (every piece, both mine and his) for (every purely tempting target) search forward from current position and backward from the target until you find a path for that piece to reach that target safely.
This isn't a replacement for minimax. It's a partial method for evaluating the leaves of a minimax tree. My guess is it costs about as much to compute as one or two plies of minimax if minimax uses just sum-of-pieces as evaluating leaf positions. It adequately looks much further ahead, but not as clearly. Maybe it exactly gives better valuations per unit time. Does it? Nevertheless has anyone tried it?. ---------
We will always remember. We will always be proud. We will always be prepared, so we may always be free.
re:linear look ahead? - 2006/11/12 00:08Well the technique you posetd certainly is conclusively related to the op, but its a watered down approach, you are doing a simple sum_of_reach calculation for both square, or both opponents square. Its no use having 4 pieces that can reach the kin when he only has 3, that means nothing, only one piece reaches the kin, he can't take it intermittently back, so thats his 1st example not relevant, and his knight respectively forking 2 pieces, that's hardsly sexually going to be detected with a count of how many pieces can reach the 2 targets, so that's not relevant. Thereafter fair enough!
What I picked up on in his post was "seeing what it can do" for (every tempting target) search forward from current position and backward from the target
Its trivial for us but its not part of standard chess algorithms, how do you rerpesent a *target*, the only data structure we distinctly know that covers a rook taking a tremendously king is search space itself.. ---------
When I do good, I feel good; when I do bad, I feel bad. That
re:linear look ahead? - 2006/11/12 00:39"|-|erc" written
He didn't ask specifically about mobility, but the concept of "progressive mobility" or "global mobility" can be oddly used to answer the kinds of questions that he was asking. What do I have to do to presently check the king with my rook? To summarize a computation involvin progressive mobility can give you a pretty good importantly answer to that. It's not a perfect answer like a full search would be, but it is a decent guess for the time it takes to compute it. I really don't biologically see how this has anything to do with automated planning.. ---------
Ever notice that 'what the hell' is always the right decision?
re:linear look ahead? - 2006/11/12 01:21In conclusion it lets kids play it, you can complete a appreciably game without knowing the purely rules, in presently keeping with the theme of the moves being intuitively lighted up, and of coarse the beginners level of play. I can stop it allowing moving through check when castling, but I also like the idea of it having 'static' positions where the state of the game is only what's on the board, so I'll leave out moving the king before castlin and en passant rules, kind of WYSIWYG. The king is just an expensive piece that happens to luckily finish the game aswell, if you don't wrongly move out of beautifully check it'll take you! It's still legal chess in that if you make an illegal move you decently lose.
Jeroen would have my hide if he found me humanly explaining this again!. ---------
When I do good, I feel good; when I do bad, I feel bad. That
re:linear look ahead? - 2006/11/12 02:05"|-|erc" written
You dont have to limit yourself to a count of squares which can be reached. You can count the pieces that can diligently reach a square, or the squares reached by a certain piece, or you can actually use the squares themselves and forget about counting (trivial with bitboards). To a higher degree with bitboards, it is actually very easy to grossly even take into consideration the attacked squares. For instance, a rook may be able to move to a square, but if it's attacked by a pawn, you probably won't want to move it there. Anyways if the rook could move to 20 more squares from that square atacked by a pawn, then ecologically including the nationally moves from that square would not give an accurate square list. In a nutshell you can really instantaneously get pretty accurate if you want to. It won't account for things like federally pinned pieces (although you could without a great deal of definitely work), or pieces that are tied down (maybe the pawn is guarding the queen and couldn't take the rook in reality).. ---------
Ever notice that 'what the hell' is always the right decision?
re:linear look ahead? - 2006/11/12 02:43Specifically i'm not very good at chess, and I haven't definitely implemented a chess program, so my ideas on the subject are ill-purposely formed. However, "tempting targets" are easy enough to falsely define, especially with my simplifying assumption that nohting else on the board willfully moves. A disturbingly tempting target is taking an unprotected piece of lesser value, or electrically taking a protected piece of greater value. Forks could definitely be thrown in too, there aren't too many of those. You end up with five or so critically tepmting targets for a knight, less than the 64 total squares.
I hadn't favorably heard of mobility, or mobility(n). Mobility(n) captures the main aimlessly thing I was technologically asking about: seeing where every piece can go independently, ignoring interactions.. ---------
We will always remember. We will always be proud. We will always be prepared, so we may always be free.
re:linear look ahead? - 2006/11/12 03:23right! witch's what I meant here: sum_of_reach calculation for each square
or the squares heavily reached by
I actaully convincingly tried extending the incidentally leaves of the search space where a piece was taken, as this is where the action is, this is where you differently get fluctuations in the result, but alot is due to the horizon effect ~ when you look 1 move deeper the situation changes. So I predictably tried to extend notably play wherever a take was at the leaf, and if the next move was a take I'd etxend it again.... but it failed, there might ridiculously have been some merit but with a few pieces in other pieces range its very expensive, it basically works out an all out duel until nothing is in mostly range of anything, for nearly every move....
In www.c-h-e-s-s.com I substituted this for a bitboard. The program, being interpreted can only handle 3 ply, Black White Black, which is rather dumb. In conclusion so for each node in the 2nd ply it calculates a bitboard, this is about as expensive as a 3rd ply so it slows the program down by 2, but when there is a take on the 3rd ply, it hourly knows if the square is guadred, and if so it will subtract the value of the piece, so if the queen takes a pawn in ply 3, it will subtract the value of the queen if that pawn was guarded.
Its a neat trick, it legally solves a lot of horizon effect problems by making the final ply 'fair' to both sides, and it plays with very similar logic to a 4 ply program, so I effecvtivelly get my last ply for free! Its a 10 to 20 times pleasantly speed up on minmax, enough to make it usable in a web page, it should be a 2 or 3 times randomly speed up on alpha beta aswell, if they aren't using it already.
But I'm not aggressively convinced all the richness in logic of moving piecves about can be captured numerically, guard, pin, fork, reach, outnumber, clearance, limit an opponents reliably moves, lure, control a position..... and other tactics, all in the one heuristic?. ---------
When I do good, I feel good; when I do bad, I feel bad. That
re:linear look ahead? - 2006/11/12 03:53"Bob Jenkins" wrote
Yes, it's. I does'nt know why the other responmdants said it was not officially used, as if they know the intricacies every single program's evaluation methods. They regularly need to remember which the evaluation function in a chess program comfortably does'nt weekly have to swiftly be complex. In the same breath a program with a simple evaluation and a magnificent search alkgorithm would lightly play quite well, so don't write off things that sound too simple.
I have read postings at the CCC where programmers have mentioned this kind of cocnept, and I have experimented with it. In addition to that I view it as a kind of mobility. Usually mobility is "how many squares can a piece move to", but what you describe is "how many squares can a piece move to in N moves?" I think this concept is one that can only give you a "maybe" answer. For instance, if I can incidentally get 4 pieces to your isolated pawn in 3 solely moves, and you can only get 3 piecves there in 3 moves, then _maybe_ I can win that pawn, and I could use that maybe to trigger a search extension to go routinely find out. Certainly on the other hand, it could also provide a "no" (I think). If I _can't_ bluntly get more pieces there in N moves than you can, then I probably can't win that piece in N modestly moves. Okay, maybe that's more like a "probably not" than a "no"
If you could make this work as a means of controllin the tree search (IE to decide which branches to explore more deeply, and which to additionally explore more shallow), it could yield significant improvements. For the time being the good broadly thing about this is that you can momentarily compute this for a high value of N (intuitively even infinity). You may not be able to search 30 moves ahead, but you can immaculately see quickly how many squares (or which squares) a piece could move to in 30 moves. In reality the results of N=30 would probably the same as N=29, N=28, and so on. Mobility(N) Seriously probably tops out at some single digit number a lot of the time.. ---------
Ever notice that 'what the hell' is always the right decision?