Astar on CuriousCodinghttps://curiouscoding.nl/tags/astar/Recent content in Astar on CuriousCodingHugoenTue, 28 May 2024 00:00:00 +0200Thoughts on POASTAhttps://curiouscoding.nl/posts/poasta/Tue, 28 May 2024 00:00:00 +0200https://curiouscoding.nl/posts/poasta/Table of Contents Summary Background Review comments DFS Supplementary methods Details of pruning Evals Discussion Code & repo Here are some thoughts on POASTA (van Dijk et al. 2024), a recent affine-cost sequence-to-DAG (POA) aligner inspired by WFA and using A*.
Summary Take a query and a directed acyclic graph (DAG). Align the query to the full DAG. It’s like global alignment for graphs. In fact I think the graph doesn’t actually have to be acyclic, as long as it has a start and end.A*PA2: Up to 19x faster exact global alignmenthttps://curiouscoding.nl/posts/astarpa2/Sat, 23 Mar 2024 00:00:00 +0100https://curiouscoding.nl/posts/astarpa2/Table of Contents Abstract 1 Introduction 1.1 Contributions 1.2 Previous work 1.2.1 Needleman-Wunsch 1.2.2 Graph algorithms 1.2.3 Computational volumes 1.2.4 Parallelism 1.2.5 Tools 2 Preliminaries 3 Methods 3.1 Band-doubling 3.2 Blocks 3.3 Memory 3.4 SIMD 3.5 SIMD-friendly sequence profile 3.6 Traceback 3.7 A* 3.7.1 Bulk-contours update 3.7.2 Pre-pruning 3.8 Determining the rows to compute 3.8.1 Sparse heuristic invocation 3.9 Incremental doubling 4 Results 4.1 Setup 4.2 Comparison with other aligners 4.Shortest paths, bucket queues, and A* on the edit graphhttps://curiouscoding.nl/posts/shortest_path_history/Sat, 29 Jul 2023 00:00:00 +0200https://curiouscoding.nl/posts/shortest_path_history/Table of Contents Shortest path algorithms .. .. in general .. for circuit design Bucket queues Shortest path algorithms by Hadlock Grid graphs Strings Spouge’s computational volumes This note summarizes some papers I was reading while investigating the history of A* for pairwise alignment, and related to that the first usage of a bucket queue. Schrijver (2012) provides a nice overview of general shortest path methods.
Shortest path algorithms .Reducing A* memory usage using frontshttps://curiouscoding.nl/posts/astar-memory-usage/Mon, 26 Sep 2022 00:00:00 +0200https://curiouscoding.nl/posts/astar-memory-usage/Table of Contents Motivation Parititioning A* memory by fronts Non-consistent heuristics Front indexing Tracing back the path Here is an idea to reduce the memory usage of A* by only storing one front at a time, similar to what Edlib and WFA do. Note that for now this will not work, but I’m putting this online anyway.
Motivation In our implementation of A*PA, we use a hashmap to store the value of \(g\) of all visited (explored/expanded) states by A*.Speeding up A*: computational volumes and path-pruninghttps://curiouscoding.nl/posts/speeding-up-astar/Fri, 23 Sep 2022 00:00:00 +0200https://curiouscoding.nl/posts/speeding-up-astar/Table of Contents Motivation Summary Why is A* slow? Computational volumes Dealing with pruning Thoughts on more aggressive pruning Algorithm summary Challenges Results What about band-doubling? Maybe doubling can work after all? TODOs Extensions This post build on top of our recent preprint Groot Koerkamp and Ivanov (2024) and gives an overview of some of my new ideas to significantly speed up exact global pairwise alignment. It’s recommended you understand the seed heuristic and match pruning before reading this post.Bidirectional A*https://curiouscoding.nl/posts/bidirectional-astar/Thu, 28 Jul 2022 17:59:00 +0200https://curiouscoding.nl/posts/bidirectional-astar/These are some links and papers on bidirectional A* variants. Nothing insightful at the moment.
small lecture introduces \(h_f(u) = \frac 12 (\pi_f(u) - \pi_r)\). Not found a paper yet. An Improved Bidirectional Heuristic Search Algorithm (Champeaux 1977) introduces a bidirectional variant Bidirectional Heuristic Search Again (Champeaux 1983) fixes a bug in the above paper Efficient modified bidirectional A* algorithm for optimal route-finding Didn’t read closely yet. A new bidirectional algorithm for shortest paths (Pijls 2008) Actually a new methods.A* variantshttps://curiouscoding.nl/posts/astar-variants/Sun, 12 Jun 2022 12:04:00 +0200https://curiouscoding.nl/posts/astar-variants/These are some quick notes listing papers related to A* itself and variants. In particular, here I’m interested in papers that update \(h\) during the A* search, as a background for pruning.
Specifically, our version of pruning increases \(h\) during a single A* search, and in fact the heuristic becomes in-admissible after pruning.
Changing \(h\) The original A* paper has a proof of optimality. Later papers consider this also with heuristics that change their value over time.Pruning for A* heuristicshttps://curiouscoding.nl/posts/pruning/Sat, 11 Dec 2021 00:00:00 +0100https://curiouscoding.nl/posts/pruning/Note: this post extends the concept of multiple-path pruning presented in Poole and Mackworth (2017).
Say we’re running A* in a graph from \(s\) to \(t\). \(d(s,t)\) is the distance we are looking for.
An A* heuristic has to satisfy \(h(u) \leq d(u, t)\) to be admissible: the estimated distance to the end should never be larger than the actual distance to guarantee that the algorithm finds a shortest path.AStarixhttps://curiouscoding.nl/posts/astarix/Fri, 12 Nov 2021 13:05:00 +0100https://curiouscoding.nl/posts/astarix/Papers
AStarix: Fast and Optimal Sequence-to-Graph Alignment Fast and Optimal Sequence-to-Graph Alignment Guided by Seeds AStarix is a method for aligning sequences (reads) to graphs:
Input A reference sequence or graph Alignment costs \((\Delta_{match}, \Delta_{subst}, \Delta_{del}, \Delta_{ins})\) for a match, substitution, insertion and deletion Sequence(s) to align Output An optimal alignment of each input sequence The input is a reference graph (automaton really) \(G_r = (V_r, E_r)\) with edges \(E_r \subseteq V_r\times V_r\times \Sigma\) that indicate the transitions between states.