RuleLoader: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
{{GollyNavbox}}
Confocal (talk | contribs)
expand, links
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Glossary}}{{stub}}
{{Glossary}}{{stub}}
'''RuleLoader''' is the algorithm that [[Golly]] uses to simulate <tt>.rule</tt> files, also known as '''rule tables''' and '''rule trees'''. A description of the file format is provided in Golly's help files.
'''RuleLoader''' is the algorithm that [[Golly]] uses to simulate {{filename|.rule}} files, also known as '''rule tables''' and '''rule trees'''. A description of the file format is provided in Golly's built-in help.<ref name="help_ruleloader" /><ref name="help_ruleformat" />
 
==Description==
{{related|Tutorials/Creating custom rules}}
The RuleLoader algorithm allows rules to be specified in external files. Given the rule string "Foo", RuleLoader will search for a file called {{filename|Foo.rule}}.<ref name="help_ruleloader" />
 
A {{filename|.rule}} file contains all the information about a rule: its name, documentation, table/tree data (used by the RuleLoader algorithm), and any color/icon information. The {{filename|.rule}} format is textual and consists of one or more sections. Each section starts with a line of the form <tt>@XXX...</tt> where X is an uppercase letter. If there is more than one section with the same name then only the first one is used. Any unrecognized sections are silently ignored.<ref name="help_ruleformat" />
 
The currently recognized sections are:<ref name="help_ruleformat" />
* @RULE (mandatory)
* @TABLE (optional)
* @TREE (optional)
* @COLORS (optional)
* @ICONS (optional)


==See also==
==See also==
*[[Tutorials/Creating custom rules]]
* [[Nutshell]]
 
==References==
<references>
<ref name="help_ruleloader">{{LinkGollyHelp|filename=Algorithms/RuleLoader.html|title=RuleLoader}} (Help &rarr; Algorithms &rarr; RuleLoader)</ref>
<ref name="help_ruleformat">{{LinkGollyHelp|filename=formats.html#rule|title=Rule format}} (Help &rarr; File formats &rarr; Rule format)</ref>
</references>


==External links==
==External links==
{{LinkGollyHelp|filename=Algorithms/RuleLoader.html}}
* {{LinkForumThread|f=11|t=2030|title=Rule request thread}}
{{LinkGollyHelp|filename=formats.html#rule|title=.rule format description}}
* {{LinkForumThread|f=11|t=3302|title=RuleLoader's B0 handling quirks}}
* {{cite web
|url  = https://github.com/GollyGang/ruletablerepository
|title = Rule Table Repository
|work  = github.com/GollyGang
}}
 


{{GollyNavbox}}
{{GollyNavbox}}


[[Category:Algorithms]]
[[Category:Algorithms]]
[[Category:Multistate rules]]
__NOTOC__

Latest revision as of 08:02, 10 March 2023

This article is a stub. You can help LifeWiki by expanding it.

RuleLoader is the algorithm that Golly uses to simulate .rule files, also known as rule tables and rule trees. A description of the file format is provided in Golly's built-in help.[1][2]

Description

See also: Tutorials/Creating custom rules

The RuleLoader algorithm allows rules to be specified in external files. Given the rule string "Foo", RuleLoader will search for a file called Foo.rule.[1]

A .rule file contains all the information about a rule: its name, documentation, table/tree data (used by the RuleLoader algorithm), and any color/icon information. The .rule format is textual and consists of one or more sections. Each section starts with a line of the form @XXX... where X is an uppercase letter. If there is more than one section with the same name then only the first one is used. Any unrecognized sections are silently ignored.[2]

The currently recognized sections are:[2]

  • @RULE (mandatory)
  • @TABLE (optional)
  • @TREE (optional)
  • @COLORS (optional)
  • @ICONS (optional)

See also

References

  1. 1.0 1.1 RuleLoader at Golly's online help (Help → Algorithms → RuleLoader)
  2. 2.0 2.1 2.2 Rule format at Golly's online help (Help → File formats → Rule format)