<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://robowiki.net/w/index.php?action=history&amp;feed=atom&amp;title=Folded_Pattern_Matcher</id>
	<title>Folded Pattern Matcher - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://robowiki.net/w/index.php?action=history&amp;feed=atom&amp;title=Folded_Pattern_Matcher"/>
	<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Folded_Pattern_Matcher&amp;action=history"/>
	<updated>2026-04-19T12:41:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Folded_Pattern_Matcher&amp;diff=24895&amp;oldid=prev</id>
		<title>Voidious: remove cleanup, add category, see also Sequential Prediction</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Folded_Pattern_Matcher&amp;diff=24895&amp;oldid=prev"/>
		<updated>2012-06-12T19:53:47Z</updated>

		<summary type="html">&lt;p&gt;remove cleanup, add category, see also &lt;a href=&quot;/wiki/Sequential_Prediction&quot; title=&quot;Sequential Prediction&quot;&gt;Sequential Prediction&lt;/a&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 19:53, 12 June 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{cleanup}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I like the idea of [[PatternMatching|pattern matching]] but was afraid of performance issues. [[SymbolicPatternMatching|Symbolic pattern matchers]] get&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I like the idea of [[PatternMatching|pattern matching]] but was afraid of performance issues. [[SymbolicPatternMatching|Symbolic pattern matchers]] get&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;around some of these issues by using optimized Java string libraries. Still, there's only so much a  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;around some of these issues by using optimized Java string libraries. Still, there's only so much a  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l183&quot; &gt;Line 183:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 182:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== See also ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [[Sequential Prediction]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Targeting]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-16765:rev-24895 --&gt;
&lt;/table&gt;</summary>
		<author><name>Voidious</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Folded_Pattern_Matcher&amp;diff=16765&amp;oldid=prev</id>
		<title>RednaxelaBot: Using &lt;syntaxhighlight&gt;.</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Folded_Pattern_Matcher&amp;diff=16765&amp;oldid=prev"/>
		<updated>2010-07-01T08:27:43Z</updated>

		<summary type="html">&lt;p&gt;Using &amp;lt;syntaxhighlight&amp;gt;.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 08:27, 1 July 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l69&quot; &gt;Line 69:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 69:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Feel free to use and improve the code but please return the results to the wiki. Cheers. --[[Corbos]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Feel free to use and improve the code but please return the results to the wiki. Cheers. --[[Corbos]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import java.awt.geom.Point2D;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import java.awt.geom.Point2D;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l182&quot; &gt;Line 182:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 182:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-14642:rev-16765 --&gt;
&lt;/table&gt;</summary>
		<author><name>RednaxelaBot</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Folded_Pattern_Matcher&amp;diff=14642&amp;oldid=prev</id>
		<title>Nat: credit should be at talk page</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Folded_Pattern_Matcher&amp;diff=14642&amp;oldid=prev"/>
		<updated>2010-01-24T10:11:09Z</updated>

		<summary type="html">&lt;p&gt;credit should be at talk page&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 10:11, 24 January 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;CreditForOldWikiArticle&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;cleanup&lt;/ins&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;| oldpage=FoldedPatternMatcher&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;| author=[[Corbos]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I like the idea of [[PatternMatching|pattern matching]] but was afraid of performance issues. [[SymbolicPatternMatching|Symbolic pattern matchers]] get&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;I like the idea of [[PatternMatching|pattern matching]] but was afraid of performance issues. [[SymbolicPatternMatching|Symbolic pattern matchers]] get&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;around some of these issues by using optimized Java string libraries. Still, there's only so much a  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;around some of these issues by using optimized Java string libraries. Still, there's only so much a  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-14640:rev-14642 --&gt;
&lt;/table&gt;</summary>
		<author><name>Nat</name></author>
		
	</entry>
	<entry>
		<id>http://robowiki.net/w/index.php?title=Folded_Pattern_Matcher&amp;diff=14640&amp;oldid=prev</id>
		<title>Duyn: Migrated from old wiki</title>
		<link rel="alternate" type="text/html" href="http://robowiki.net/w/index.php?title=Folded_Pattern_Matcher&amp;diff=14640&amp;oldid=prev"/>
		<updated>2010-01-24T05:58:27Z</updated>

		<summary type="html">&lt;p&gt;Migrated from old wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{CreditForOldWikiArticle&lt;br /&gt;
| oldpage=FoldedPatternMatcher&lt;br /&gt;
| author=[[Corbos]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
I like the idea of [[PatternMatching|pattern matching]] but was afraid of performance issues. [[SymbolicPatternMatching|Symbolic pattern matchers]] get&lt;br /&gt;
around some of these issues by using optimized Java string libraries. Still, there's only so much a &lt;br /&gt;
[http://www-igm.univ-mlv.fr/~lecroq/string/node14.html Boyers-Moore algorithm] or regular expression parser can do. If you're interested in checking patterns of&lt;br /&gt;
many sizes, Robocode &amp;lt;b&amp;gt;will&amp;lt;/b&amp;gt; slow down. Even if it works, the resulting pattern matcher might not work in a [[VirtualGuns|Virtual Gun]] array.&lt;br /&gt;
&lt;br /&gt;
An optimized algorithm came to me while I was showering before work:&lt;br /&gt;
&lt;br /&gt;
Imagine a symbolic pattern matcher with a six character alphabet. A typical implementation might store its history in a string like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Character&lt;br /&gt;
Index-&amp;gt;0000000000111111111122222222223333&lt;br /&gt;
       0123456789012345678901234567890123&lt;br /&gt;
       ||||||||||||||||||||||||||||||||||&lt;br /&gt;
       BFFADEDCEFBEDADCFCCFEEADDEBFACCEEA &amp;lt;-New characters appended here.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These strings are best searched using Java string libraries.&lt;br /&gt;
&lt;br /&gt;
Now imagine a &amp;quot;folded&amp;quot; string that is folded at each changed symbol. Besides characters linked in a string, identical symbols could be linked one to the next using a linked list or similar data structure like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Character&lt;br /&gt;
Index-&amp;gt;0000000000111111111122222222223333&lt;br /&gt;
       0123456789012345678901234567890123&lt;br /&gt;
       ||||||||||||||||||||||||||||||||||&lt;br /&gt;
          A&amp;lt;--------A&amp;lt;-------A&amp;lt;----A&amp;lt;---A&amp;lt;-A index&lt;br /&gt;
       B&amp;lt;--------B&amp;lt;--------------B&amp;lt;--------B index&lt;br /&gt;
              C&amp;lt;------C&amp;lt;CC&amp;lt;---------CC&amp;lt;----C index&lt;br /&gt;
           D&amp;lt;D&amp;lt;----D&amp;lt;D&amp;lt;-------DD&amp;lt;----------D index&lt;br /&gt;
            E&amp;lt;-E&amp;lt;-E&amp;lt;-------EE&amp;lt;--E&amp;lt;----EE&amp;lt;--E index&lt;br /&gt;
        FF&amp;lt;-----F&amp;lt;-----F&amp;lt;-F&amp;lt;------F&amp;lt;-------F index&lt;br /&gt;
                                         ^&lt;br /&gt;
                                         |&lt;br /&gt;
                                         New characters appended here.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To append the next character (I'll say 'A'):&lt;br /&gt;
&lt;br /&gt;
*Add it to the string (or other data structure) just like you would in flat pattern matching.&lt;br /&gt;
*Create a reference from your new 'A' to the latest 'A' in the A index list.&lt;br /&gt;
*Point the A index list reference at your new 'A'.&lt;br /&gt;
&lt;br /&gt;
Now you're ready to match a pattern:&lt;br /&gt;
&lt;br /&gt;
*Take the first character in your recent pattern. In this case, the 'A' at index 33.&lt;br /&gt;
*Follow its index reference directly to the next 'A' in your string. In this case, the 'A' at index 28. (Interesting note: If there were no matches, you'd know immediately because the A index reference would be null.)&lt;br /&gt;
*Make sure you have a reference to A33 and A28&lt;br /&gt;
*Use these references to look one character deeper in the pattern and history. The character before A33 is E32 and the character before A28 is F27 so there's no match. Our first attempt yields a match only one character deep.&lt;br /&gt;
*Now repeat the process.&lt;br /&gt;
*Your pattern starts at A33.&lt;br /&gt;
*Follow your 'A' index reference to the 'A' at 22.&lt;br /&gt;
*Look a character deeper in pattern and history. The character before A33 is E32 and the character before A22 is E21 so we have a two-character match.&lt;br /&gt;
*Look a character deeper. E31 precedes E32 and E20 precedes E21 so we have a three-character match.&lt;br /&gt;
*One deeper. C30 precedes E31 and F19 precedes E20 for no match.&lt;br /&gt;
*Repeat with the next 'A' index ...&lt;br /&gt;
&lt;br /&gt;
There are two nice outcomes from this approach. First, it's fast. Most pattern matching algorithms aren't aware of their inputs before they receive them so they can't take advantage of indexing until they've already passed through the pattern and history at least once. We get around this by indexing as the string is built. Second, you don't have to guess at the length of your maximum match. The algorithm explores the absolute depth of every existing one-character match.&lt;br /&gt;
&lt;br /&gt;
I've included a prototype implementation below. It comes with no guarantees. There are more than a few things to iron out. Namely:&lt;br /&gt;
&lt;br /&gt;
#It currently uses my own strongly-typed collections. Java linked lists, array lists, etc, might work just as well and be easier to manage.&lt;br /&gt;
#It doesn't sense when a projected destination is outside the battlefield.&lt;br /&gt;
#It contains round breaks but doesn't do anything with them. A pattern match might project into the next round.&lt;br /&gt;
#There's no memory management. The longer it runs, the more it steals.&lt;br /&gt;
#Since its fast, it makes sense to crunch some stats like [[TronsGun]] when a deep match isn't found. (Which happens a lot.)&lt;br /&gt;
&lt;br /&gt;
Feel free to use and improve the code but please return the results to the wiki. Cheers. --[[Corbos]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import java.awt.geom.Point2D;&lt;br /&gt;
&lt;br /&gt;
public class FoldedPatternMatcher {&lt;br /&gt;
	&lt;br /&gt;
	private PatternNode[] _nodeIndexes;&lt;br /&gt;
	private PatternNode _head;&lt;br /&gt;
	private int _scanCount = 0;&lt;br /&gt;
	final double TEN_DEGREES = 10 * Math.PI / 180;&lt;br /&gt;
	final double TWENTY_DEGREES = TEN_DEGREES * 2;&lt;br /&gt;
	final char BREAK_SCAN = '\uffff';&lt;br /&gt;
	&lt;br /&gt;
	public FoldedPatternMatcher(){&lt;br /&gt;
		_nodeIndexes = new PatternNode[512];&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	public void record(double velocity, double headingDelta){&lt;br /&gt;
		int index = (((int)((velocity + 8) * 15 / 16) &amp;lt;&amp;lt; 5) | ((int)((headingDelta + TEN_DEGREES) * 31 / TWENTY_DEGREES)));&lt;br /&gt;
		PatternNode node = new PatternNode((char)index, _scanCount++);&lt;br /&gt;
		insert(node);&lt;br /&gt;
		node.IndexRef = _nodeIndexes[index];&lt;br /&gt;
		_nodeIndexes[index] = node;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	public void insertBreak(){&lt;br /&gt;
		insert(new PatternNode(BREAK_SCAN, _scanCount++));&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	private void insert(PatternNode node){&lt;br /&gt;
		node.SequenceRef = _head;&lt;br /&gt;
		_head = node;&lt;br /&gt;
		if(node.SequenceRef != null){&lt;br /&gt;
			node.SequenceRef.ReverseSequenceRef = node;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	public Point2D.Double project(Point2D.Double enemyLocation, double currentHeading, double bulletVelocity, Point2D.Double robotLocation){&lt;br /&gt;
		&lt;br /&gt;
		Point2D.Double nextPosition = null;&lt;br /&gt;
		PatternNode indexSymbol, cursor;&lt;br /&gt;
		PatternNode lastSymbol = _head;&lt;br /&gt;
		PatternNode bestSymbol = null;&lt;br /&gt;
		indexSymbol = _head.IndexRef;&lt;br /&gt;
		int depth;&lt;br /&gt;
		int bestDepth = 0;&lt;br /&gt;
		&lt;br /&gt;
		while(indexSymbol != null &amp;amp;&amp;amp; lastSymbol.Index - indexSymbol.Index &amp;lt; 55000){&lt;br /&gt;
			&lt;br /&gt;
			if(lastSymbol.Index - indexSymbol.Index &amp;gt; 20){&lt;br /&gt;
				&lt;br /&gt;
				cursor = indexSymbol;&lt;br /&gt;
				depth = 0;&lt;br /&gt;
				&lt;br /&gt;
				while(lastSymbol != null &amp;amp;&amp;amp; cursor != null &amp;amp;&amp;amp; lastSymbol.Symbol == cursor.Symbol &amp;amp;&amp;amp; depth &amp;lt; 125){&lt;br /&gt;
					lastSymbol = lastSymbol.SequenceRef;&lt;br /&gt;
					cursor = cursor.SequenceRef;&lt;br /&gt;
					depth++;&lt;br /&gt;
				}&lt;br /&gt;
				&lt;br /&gt;
				if(depth &amp;gt;= bestDepth){&lt;br /&gt;
					bestSymbol = indexSymbol;&lt;br /&gt;
					bestDepth = depth;&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
			lastSymbol = _head;&lt;br /&gt;
			indexSymbol = indexSymbol.IndexRef;&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		if(bestSymbol != null){&lt;br /&gt;
			double projectedTime = 0;&lt;br /&gt;
			double enemyX = enemyLocation.x;&lt;br /&gt;
			double enemyY = enemyLocation.y;&lt;br /&gt;
			bestSymbol = bestSymbol.ReverseSequenceRef;&lt;br /&gt;
			while(Point2D.distance(robotLocation.x, robotLocation.y, enemyX, enemyY) &amp;gt; projectedTime * bulletVelocity &amp;amp;&amp;amp; bestSymbol != null){&lt;br /&gt;
				currentHeading += bestSymbol.getHeading();&lt;br /&gt;
				enemyX += Math.sin(currentHeading) * bestSymbol.getVelocity();&lt;br /&gt;
				enemyY += Math.cos(currentHeading) * bestSymbol.getVelocity();&lt;br /&gt;
				bestSymbol = bestSymbol.ReverseSequenceRef;&lt;br /&gt;
				projectedTime++;&lt;br /&gt;
			}&lt;br /&gt;
			nextPosition = new Point2D.Double(enemyX, enemyY);&lt;br /&gt;
		}&lt;br /&gt;
		return nextPosition;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	class PatternNode{&lt;br /&gt;
		&lt;br /&gt;
		public PatternNode IndexRef;&lt;br /&gt;
		public PatternNode SequenceRef;&lt;br /&gt;
		public PatternNode ReverseSequenceRef;&lt;br /&gt;
		public char Symbol;&lt;br /&gt;
		public int Index;&lt;br /&gt;
		&lt;br /&gt;
		public PatternNode(char s, int index){&lt;br /&gt;
			Symbol = s;&lt;br /&gt;
			Index = index;&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		public double getVelocity(){&lt;br /&gt;
			int i = (int)Symbol;&lt;br /&gt;
			i = i &amp;gt;&amp;gt; 5;&lt;br /&gt;
			return (((double)i) * 16 / 15) - 8;&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		public double getHeading(){&lt;br /&gt;
			int i = (int)Symbol;&lt;br /&gt;
			i = i &amp;amp; 31;&lt;br /&gt;
			return (((double)i) * TWENTY_DEGREES / 31) - TEN_DEGREES;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Duyn</name></author>
		
	</entry>
</feed>