+
+ Read the Docs
+ v: ${config.versions.current.slug}
+
+
+
+
+ ${renderLanguages(config)}
+ ${renderVersions(config)}
+ ${renderDownloads(config)}
+
+ On Read the Docs
+
+ Project Home
+
+
+ Builds
+
+
+ Downloads
+
+
+
+ Search
+
+
+
+
+
+
+ Hosted by Read the Docs
+
+
+
+ `;
+
+ // Inject the generated flyout into the body HTML element.
+ document.body.insertAdjacentHTML("beforeend", flyout);
+
+ // Trigger the Read the Docs Addons Search modal when clicking on the "Search docs" input from inside the flyout.
+ document
+ .querySelector("#flyout-search-form")
+ .addEventListener("focusin", () => {
+ const event = new CustomEvent("readthedocs-search-show");
+ document.dispatchEvent(event);
+ });
+ })
+}
+
+if (themeLanguageSelector || themeVersionSelector) {
+ function onSelectorSwitch(event) {
+ const option = event.target.selectedIndex;
+ const item = event.target.options[option];
+ window.location.href = item.dataset.url;
+ }
+
+ document.addEventListener("readthedocs-addons-data-ready", function (event) {
+ const config = event.detail.data();
+
+ const versionSwitch = document.querySelector(
+ "div.switch-menus > div.version-switch",
+ );
+ if (themeVersionSelector) {
+ let versions = config.versions.active;
+ if (config.versions.current.hidden || config.versions.current.type === "external") {
+ versions.unshift(config.versions.current);
+ }
+ const versionSelect = `
+
+ ${versions
+ .map(
+ (version) => `
+
+ ${version.slug}
+ `,
+ )
+ .join("\n")}
+
+ `;
+
+ versionSwitch.innerHTML = versionSelect;
+ versionSwitch.firstElementChild.addEventListener("change", onSelectorSwitch);
+ }
+
+ const languageSwitch = document.querySelector(
+ "div.switch-menus > div.language-switch",
+ );
+
+ if (themeLanguageSelector) {
+ if (config.projects.translations.length) {
+ // Add the current language to the options on the selector
+ let languages = config.projects.translations.concat(
+ config.projects.current,
+ );
+ languages = languages.sort((a, b) =>
+ a.language.name.localeCompare(b.language.name),
+ );
+
+ const languageSelect = `
+
+ ${languages
+ .map(
+ (language) => `
+
+ ${language.language.name}
+ `,
+ )
+ .join("\n")}
+
+ `;
+
+ languageSwitch.innerHTML = languageSelect;
+ languageSwitch.firstElementChild.addEventListener("change", onSelectorSwitch);
+ }
+ else {
+ languageSwitch.remove();
+ }
+ }
+ });
+}
+
+document.addEventListener("readthedocs-addons-data-ready", function (event) {
+ // Trigger the Read the Docs Addons Search modal when clicking on "Search docs" input from the topnav.
+ document
+ .querySelector("[role='search'] input")
+ .addEventListener("focusin", () => {
+ const event = new CustomEvent("readthedocs-search-show");
+ document.dispatchEvent(event);
+ });
+});
\ No newline at end of file
diff --git a/docs/sphinx/build/html/_static/language_data.js b/docs/sphinx/build/html/_static/language_data.js
new file mode 100644
index 000000000..c7fe6c6fa
--- /dev/null
+++ b/docs/sphinx/build/html/_static/language_data.js
@@ -0,0 +1,192 @@
+/*
+ * This script contains the language-specific data used by searchtools.js,
+ * namely the list of stopwords, stemmer, scorer and splitter.
+ */
+
+var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
+
+
+/* Non-minified version is copied as a separate JS file, if available */
+
+/**
+ * Porter Stemmer
+ */
+var Stemmer = function() {
+
+ var step2list = {
+ ational: 'ate',
+ tional: 'tion',
+ enci: 'ence',
+ anci: 'ance',
+ izer: 'ize',
+ bli: 'ble',
+ alli: 'al',
+ entli: 'ent',
+ eli: 'e',
+ ousli: 'ous',
+ ization: 'ize',
+ ation: 'ate',
+ ator: 'ate',
+ alism: 'al',
+ iveness: 'ive',
+ fulness: 'ful',
+ ousness: 'ous',
+ aliti: 'al',
+ iviti: 'ive',
+ biliti: 'ble',
+ logi: 'log'
+ };
+
+ var step3list = {
+ icate: 'ic',
+ ative: '',
+ alize: 'al',
+ iciti: 'ic',
+ ical: 'ic',
+ ful: '',
+ ness: ''
+ };
+
+ var c = "[^aeiou]"; // consonant
+ var v = "[aeiouy]"; // vowel
+ var C = c + "[^aeiouy]*"; // consonant sequence
+ var V = v + "[aeiou]*"; // vowel sequence
+
+ var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
+ var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
+ var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
+ var s_v = "^(" + C + ")?" + v; // vowel in stem
+
+ this.stemWord = function (w) {
+ var stem;
+ var suffix;
+ var firstch;
+ var origword = w;
+
+ if (w.length < 3)
+ return w;
+
+ var re;
+ var re2;
+ var re3;
+ var re4;
+
+ firstch = w.substr(0,1);
+ if (firstch == "y")
+ w = firstch.toUpperCase() + w.substr(1);
+
+ // Step 1a
+ re = /^(.+?)(ss|i)es$/;
+ re2 = /^(.+?)([^s])s$/;
+
+ if (re.test(w))
+ w = w.replace(re,"$1$2");
+ else if (re2.test(w))
+ w = w.replace(re2,"$1$2");
+
+ // Step 1b
+ re = /^(.+?)eed$/;
+ re2 = /^(.+?)(ed|ing)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ re = new RegExp(mgr0);
+ if (re.test(fp[1])) {
+ re = /.$/;
+ w = w.replace(re,"");
+ }
+ }
+ else if (re2.test(w)) {
+ var fp = re2.exec(w);
+ stem = fp[1];
+ re2 = new RegExp(s_v);
+ if (re2.test(stem)) {
+ w = stem;
+ re2 = /(at|bl|iz)$/;
+ re3 = new RegExp("([^aeiouylsz])\\1$");
+ re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+ if (re2.test(w))
+ w = w + "e";
+ else if (re3.test(w)) {
+ re = /.$/;
+ w = w.replace(re,"");
+ }
+ else if (re4.test(w))
+ w = w + "e";
+ }
+ }
+
+ // Step 1c
+ re = /^(.+?)y$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ re = new RegExp(s_v);
+ if (re.test(stem))
+ w = stem + "i";
+ }
+
+ // Step 2
+ re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ suffix = fp[2];
+ re = new RegExp(mgr0);
+ if (re.test(stem))
+ w = stem + step2list[suffix];
+ }
+
+ // Step 3
+ re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ suffix = fp[2];
+ re = new RegExp(mgr0);
+ if (re.test(stem))
+ w = stem + step3list[suffix];
+ }
+
+ // Step 4
+ re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
+ re2 = /^(.+?)(s|t)(ion)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ re = new RegExp(mgr1);
+ if (re.test(stem))
+ w = stem;
+ }
+ else if (re2.test(w)) {
+ var fp = re2.exec(w);
+ stem = fp[1] + fp[2];
+ re2 = new RegExp(mgr1);
+ if (re2.test(stem))
+ w = stem;
+ }
+
+ // Step 5
+ re = /^(.+?)e$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ re = new RegExp(mgr1);
+ re2 = new RegExp(meq1);
+ re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+ if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
+ w = stem;
+ }
+ re = /ll$/;
+ re2 = new RegExp(mgr1);
+ if (re.test(w) && re2.test(w)) {
+ re = /.$/;
+ w = w.replace(re,"");
+ }
+
+ // and turn initial Y back to y
+ if (firstch == "y")
+ w = firstch.toLowerCase() + w.substr(1);
+ return w;
+ }
+}
+
diff --git a/docs/sphinx/build/html/_static/minus.png b/docs/sphinx/build/html/_static/minus.png
new file mode 100644
index 000000000..d96755fda
Binary files /dev/null and b/docs/sphinx/build/html/_static/minus.png differ
diff --git a/docs/sphinx/build/html/_static/plus.png b/docs/sphinx/build/html/_static/plus.png
new file mode 100644
index 000000000..7107cec93
Binary files /dev/null and b/docs/sphinx/build/html/_static/plus.png differ
diff --git a/docs/sphinx/build/html/_static/pygments.css b/docs/sphinx/build/html/_static/pygments.css
new file mode 100644
index 000000000..6f8b210a1
--- /dev/null
+++ b/docs/sphinx/build/html/_static/pygments.css
@@ -0,0 +1,75 @@
+pre { line-height: 125%; }
+td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #f8f8f8; }
+.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */
+.highlight .err { border: 1px solid #F00 } /* Error */
+.highlight .k { color: #008000; font-weight: bold } /* Keyword */
+.highlight .o { color: #666 } /* Operator */
+.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
+.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #9C6500 } /* Comment.Preproc */
+.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
+.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
+.highlight .gd { color: #A00000 } /* Generic.Deleted */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
+.highlight .gr { color: #E40000 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #008400 } /* Generic.Inserted */
+.highlight .go { color: #717171 } /* Generic.Output */
+.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #04D } /* Generic.Traceback */
+.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #008000 } /* Keyword.Pseudo */
+.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #B00040 } /* Keyword.Type */
+.highlight .m { color: #666 } /* Literal.Number */
+.highlight .s { color: #BA2121 } /* Literal.String */
+.highlight .na { color: #687822 } /* Name.Attribute */
+.highlight .nb { color: #008000 } /* Name.Builtin */
+.highlight .nc { color: #00F; font-weight: bold } /* Name.Class */
+.highlight .no { color: #800 } /* Name.Constant */
+.highlight .nd { color: #A2F } /* Name.Decorator */
+.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */
+.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #00F } /* Name.Function */
+.highlight .nl { color: #767600 } /* Name.Label */
+.highlight .nn { color: #00F; font-weight: bold } /* Name.Namespace */
+.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
+.highlight .nv { color: #19177C } /* Name.Variable */
+.highlight .ow { color: #A2F; font-weight: bold } /* Operator.Word */
+.highlight .w { color: #BBB } /* Text.Whitespace */
+.highlight .mb { color: #666 } /* Literal.Number.Bin */
+.highlight .mf { color: #666 } /* Literal.Number.Float */
+.highlight .mh { color: #666 } /* Literal.Number.Hex */
+.highlight .mi { color: #666 } /* Literal.Number.Integer */
+.highlight .mo { color: #666 } /* Literal.Number.Oct */
+.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
+.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
+.highlight .sc { color: #BA2121 } /* Literal.String.Char */
+.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
+.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
+.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
+.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
+.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
+.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
+.highlight .sx { color: #008000 } /* Literal.String.Other */
+.highlight .sr { color: #A45A77 } /* Literal.String.Regex */
+.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
+.highlight .ss { color: #19177C } /* Literal.String.Symbol */
+.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #00F } /* Name.Function.Magic */
+.highlight .vc { color: #19177C } /* Name.Variable.Class */
+.highlight .vg { color: #19177C } /* Name.Variable.Global */
+.highlight .vi { color: #19177C } /* Name.Variable.Instance */
+.highlight .vm { color: #19177C } /* Name.Variable.Magic */
+.highlight .il { color: #666 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/docs/sphinx/build/html/_static/searchtools.js b/docs/sphinx/build/html/_static/searchtools.js
new file mode 100644
index 000000000..2c774d17a
--- /dev/null
+++ b/docs/sphinx/build/html/_static/searchtools.js
@@ -0,0 +1,632 @@
+/*
+ * Sphinx JavaScript utilities for the full-text search.
+ */
+"use strict";
+
+/**
+ * Simple result scoring code.
+ */
+if (typeof Scorer === "undefined") {
+ var Scorer = {
+ // Implement the following function to further tweak the score for each result
+ // The function takes a result array [docname, title, anchor, descr, score, filename]
+ // and returns the new score.
+ /*
+ score: result => {
+ const [docname, title, anchor, descr, score, filename, kind] = result
+ return score
+ },
+ */
+
+ // query matches the full name of an object
+ objNameMatch: 11,
+ // or matches in the last dotted part of the object name
+ objPartialMatch: 6,
+ // Additive scores depending on the priority of the object
+ objPrio: {
+ 0: 15, // used to be importantResults
+ 1: 5, // used to be objectResults
+ 2: -5, // used to be unimportantResults
+ },
+ // Used when the priority is not in the mapping.
+ objPrioDefault: 0,
+
+ // query found in title
+ title: 15,
+ partialTitle: 7,
+ // query found in terms
+ term: 5,
+ partialTerm: 2,
+ };
+}
+
+// Global search result kind enum, used by themes to style search results.
+class SearchResultKind {
+ static get index() { return "index"; }
+ static get object() { return "object"; }
+ static get text() { return "text"; }
+ static get title() { return "title"; }
+}
+
+const _removeChildren = (element) => {
+ while (element && element.lastChild) element.removeChild(element.lastChild);
+};
+
+/**
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
+ */
+const _escapeRegExp = (string) =>
+ string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
+
+const _displayItem = (item, searchTerms, highlightTerms) => {
+ const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
+ const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
+ const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
+ const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
+ const contentRoot = document.documentElement.dataset.content_root;
+
+ const [docName, title, anchor, descr, score, _filename, kind] = item;
+
+ let listItem = document.createElement("li");
+ // Add a class representing the item's type:
+ // can be used by a theme's CSS selector for styling
+ // See SearchResultKind for the class names.
+ listItem.classList.add(`kind-${kind}`);
+ let requestUrl;
+ let linkUrl;
+ if (docBuilder === "dirhtml") {
+ // dirhtml builder
+ let dirname = docName + "/";
+ if (dirname.match(/\/index\/$/))
+ dirname = dirname.substring(0, dirname.length - 6);
+ else if (dirname === "index/") dirname = "";
+ requestUrl = contentRoot + dirname;
+ linkUrl = requestUrl;
+ } else {
+ // normal html builders
+ requestUrl = contentRoot + docName + docFileSuffix;
+ linkUrl = docName + docLinkSuffix;
+ }
+ let linkEl = listItem.appendChild(document.createElement("a"));
+ linkEl.href = linkUrl + anchor;
+ linkEl.dataset.score = score;
+ linkEl.innerHTML = title;
+ if (descr) {
+ listItem.appendChild(document.createElement("span")).innerHTML =
+ " (" + descr + ")";
+ // highlight search terms in the description
+ if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
+ highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+ }
+ else if (showSearchSummary)
+ fetch(requestUrl)
+ .then((responseData) => responseData.text())
+ .then((data) => {
+ if (data)
+ listItem.appendChild(
+ Search.makeSearchSummary(data, searchTerms, anchor)
+ );
+ // highlight search terms in the summary
+ if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
+ highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+ });
+ Search.output.appendChild(listItem);
+};
+const _finishSearch = (resultCount) => {
+ Search.stopPulse();
+ Search.title.innerText = _("Search Results");
+ if (!resultCount)
+ Search.status.innerText = Documentation.gettext(
+ "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
+ );
+ else
+ Search.status.innerText = Documentation.ngettext(
+ "Search finished, found one page matching the search query.",
+ "Search finished, found ${resultCount} pages matching the search query.",
+ resultCount,
+ ).replace('${resultCount}', resultCount);
+};
+const _displayNextItem = (
+ results,
+ resultCount,
+ searchTerms,
+ highlightTerms,
+) => {
+ // results left, load the summary and display it
+ // this is intended to be dynamic (don't sub resultsCount)
+ if (results.length) {
+ _displayItem(results.pop(), searchTerms, highlightTerms);
+ setTimeout(
+ () => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
+ 5
+ );
+ }
+ // search finished, update title and status message
+ else _finishSearch(resultCount);
+};
+// Helper function used by query() to order search results.
+// Each input is an array of [docname, title, anchor, descr, score, filename, kind].
+// Order the results by score (in opposite order of appearance, since the
+// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically.
+const _orderResultsByScoreThenName = (a, b) => {
+ const leftScore = a[4];
+ const rightScore = b[4];
+ if (leftScore === rightScore) {
+ // same score: sort alphabetically
+ const leftTitle = a[1].toLowerCase();
+ const rightTitle = b[1].toLowerCase();
+ if (leftTitle === rightTitle) return 0;
+ return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
+ }
+ return leftScore > rightScore ? 1 : -1;
+};
+
+/**
+ * Default splitQuery function. Can be overridden in ``sphinx.search`` with a
+ * custom function per language.
+ *
+ * The regular expression works by splitting the string on consecutive characters
+ * that are not Unicode letters, numbers, underscores, or emoji characters.
+ * This is the same as ``\W+`` in Python, preserving the surrogate pair area.
+ */
+if (typeof splitQuery === "undefined") {
+ var splitQuery = (query) => query
+ .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
+ .filter(term => term) // remove remaining empty strings
+}
+
+/**
+ * Search Module
+ */
+const Search = {
+ _index: null,
+ _queued_query: null,
+ _pulse_status: -1,
+
+ htmlToText: (htmlString, anchor) => {
+ const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
+ for (const removalQuery of [".headerlink", "script", "style"]) {
+ htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() });
+ }
+ if (anchor) {
+ const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`);
+ if (anchorContent) return anchorContent.textContent;
+
+ console.warn(
+ `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.`
+ );
+ }
+
+ // if anchor not specified or not found, fall back to main content
+ const docContent = htmlElement.querySelector('[role="main"]');
+ if (docContent) return docContent.textContent;
+
+ console.warn(
+ "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template."
+ );
+ return "";
+ },
+
+ init: () => {
+ const query = new URLSearchParams(window.location.search).get("q");
+ document
+ .querySelectorAll('input[name="q"]')
+ .forEach((el) => (el.value = query));
+ if (query) Search.performSearch(query);
+ },
+
+ loadIndex: (url) =>
+ (document.body.appendChild(document.createElement("script")).src = url),
+
+ setIndex: (index) => {
+ Search._index = index;
+ if (Search._queued_query !== null) {
+ const query = Search._queued_query;
+ Search._queued_query = null;
+ Search.query(query);
+ }
+ },
+
+ hasIndex: () => Search._index !== null,
+
+ deferQuery: (query) => (Search._queued_query = query),
+
+ stopPulse: () => (Search._pulse_status = -1),
+
+ startPulse: () => {
+ if (Search._pulse_status >= 0) return;
+
+ const pulse = () => {
+ Search._pulse_status = (Search._pulse_status + 1) % 4;
+ Search.dots.innerText = ".".repeat(Search._pulse_status);
+ if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
+ };
+ pulse();
+ },
+
+ /**
+ * perform a search for something (or wait until index is loaded)
+ */
+ performSearch: (query) => {
+ // create the required interface elements
+ const searchText = document.createElement("h2");
+ searchText.textContent = _("Searching");
+ const searchSummary = document.createElement("p");
+ searchSummary.classList.add("search-summary");
+ searchSummary.innerText = "";
+ const searchList = document.createElement("ul");
+ searchList.setAttribute("role", "list");
+ searchList.classList.add("search");
+
+ const out = document.getElementById("search-results");
+ Search.title = out.appendChild(searchText);
+ Search.dots = Search.title.appendChild(document.createElement("span"));
+ Search.status = out.appendChild(searchSummary);
+ Search.output = out.appendChild(searchList);
+
+ const searchProgress = document.getElementById("search-progress");
+ // Some themes don't use the search progress node
+ if (searchProgress) {
+ searchProgress.innerText = _("Preparing search...");
+ }
+ Search.startPulse();
+
+ // index already loaded, the browser was quick!
+ if (Search.hasIndex()) Search.query(query);
+ else Search.deferQuery(query);
+ },
+
+ _parseQuery: (query) => {
+ // stem the search terms and add them to the correct list
+ const stemmer = new Stemmer();
+ const searchTerms = new Set();
+ const excludedTerms = new Set();
+ const highlightTerms = new Set();
+ const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
+ splitQuery(query.trim()).forEach((queryTerm) => {
+ const queryTermLower = queryTerm.toLowerCase();
+
+ // maybe skip this "word"
+ // stopwords array is from language_data.js
+ if (
+ stopwords.indexOf(queryTermLower) !== -1 ||
+ queryTerm.match(/^\d+$/)
+ )
+ return;
+
+ // stem the word
+ let word = stemmer.stemWord(queryTermLower);
+ // select the correct list
+ if (word[0] === "-") excludedTerms.add(word.substr(1));
+ else {
+ searchTerms.add(word);
+ highlightTerms.add(queryTermLower);
+ }
+ });
+
+ if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js
+ localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
+ }
+
+ // console.debug("SEARCH: searching for:");
+ // console.info("required: ", [...searchTerms]);
+ // console.info("excluded: ", [...excludedTerms]);
+
+ return [query, searchTerms, excludedTerms, highlightTerms, objectTerms];
+ },
+
+ /**
+ * execute search (requires search index to be loaded)
+ */
+ _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => {
+ const filenames = Search._index.filenames;
+ const docNames = Search._index.docnames;
+ const titles = Search._index.titles;
+ const allTitles = Search._index.alltitles;
+ const indexEntries = Search._index.indexentries;
+
+ // Collect multiple result groups to be sorted separately and then ordered.
+ // Each is an array of [docname, title, anchor, descr, score, filename, kind].
+ const normalResults = [];
+ const nonMainIndexResults = [];
+
+ _removeChildren(document.getElementById("search-progress"));
+
+ const queryLower = query.toLowerCase().trim();
+ for (const [title, foundTitles] of Object.entries(allTitles)) {
+ if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) {
+ for (const [file, id] of foundTitles) {
+ const score = Math.round(Scorer.title * queryLower.length / title.length);
+ const boost = titles[file] === title ? 1 : 0; // add a boost for document titles
+ normalResults.push([
+ docNames[file],
+ titles[file] !== title ? `${titles[file]} > ${title}` : title,
+ id !== null ? "#" + id : "",
+ null,
+ score + boost,
+ filenames[file],
+ SearchResultKind.title,
+ ]);
+ }
+ }
+ }
+
+ // search for explicit entries in index directives
+ for (const [entry, foundEntries] of Object.entries(indexEntries)) {
+ if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
+ for (const [file, id, isMain] of foundEntries) {
+ const score = Math.round(100 * queryLower.length / entry.length);
+ const result = [
+ docNames[file],
+ titles[file],
+ id ? "#" + id : "",
+ null,
+ score,
+ filenames[file],
+ SearchResultKind.index,
+ ];
+ if (isMain) {
+ normalResults.push(result);
+ } else {
+ nonMainIndexResults.push(result);
+ }
+ }
+ }
+ }
+
+ // lookup as object
+ objectTerms.forEach((term) =>
+ normalResults.push(...Search.performObjectSearch(term, objectTerms))
+ );
+
+ // lookup as search terms in fulltext
+ normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms));
+
+ // let the scorer override scores with a custom scoring function
+ if (Scorer.score) {
+ normalResults.forEach((item) => (item[4] = Scorer.score(item)));
+ nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item)));
+ }
+
+ // Sort each group of results by score and then alphabetically by name.
+ normalResults.sort(_orderResultsByScoreThenName);
+ nonMainIndexResults.sort(_orderResultsByScoreThenName);
+
+ // Combine the result groups in (reverse) order.
+ // Non-main index entries are typically arbitrary cross-references,
+ // so display them after other results.
+ let results = [...nonMainIndexResults, ...normalResults];
+
+ // remove duplicate search results
+ // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
+ let seen = new Set();
+ results = results.reverse().reduce((acc, result) => {
+ let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
+ if (!seen.has(resultStr)) {
+ acc.push(result);
+ seen.add(resultStr);
+ }
+ return acc;
+ }, []);
+
+ return results.reverse();
+ },
+
+ query: (query) => {
+ const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query);
+ const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms);
+
+ // for debugging
+ //Search.lastresults = results.slice(); // a copy
+ // console.info("search results:", Search.lastresults);
+
+ // print the results
+ _displayNextItem(results, results.length, searchTerms, highlightTerms);
+ },
+
+ /**
+ * search for object names
+ */
+ performObjectSearch: (object, objectTerms) => {
+ const filenames = Search._index.filenames;
+ const docNames = Search._index.docnames;
+ const objects = Search._index.objects;
+ const objNames = Search._index.objnames;
+ const titles = Search._index.titles;
+
+ const results = [];
+
+ const objectSearchCallback = (prefix, match) => {
+ const name = match[4]
+ const fullname = (prefix ? prefix + "." : "") + name;
+ const fullnameLower = fullname.toLowerCase();
+ if (fullnameLower.indexOf(object) < 0) return;
+
+ let score = 0;
+ const parts = fullnameLower.split(".");
+
+ // check for different match types: exact matches of full name or
+ // "last name" (i.e. last dotted part)
+ if (fullnameLower === object || parts.slice(-1)[0] === object)
+ score += Scorer.objNameMatch;
+ else if (parts.slice(-1)[0].indexOf(object) > -1)
+ score += Scorer.objPartialMatch; // matches in last name
+
+ const objName = objNames[match[1]][2];
+ const title = titles[match[0]];
+
+ // If more than one term searched for, we require other words to be
+ // found in the name/title/description
+ const otherTerms = new Set(objectTerms);
+ otherTerms.delete(object);
+ if (otherTerms.size > 0) {
+ const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
+ if (
+ [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
+ )
+ return;
+ }
+
+ let anchor = match[3];
+ if (anchor === "") anchor = fullname;
+ else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
+
+ const descr = objName + _(", in ") + title;
+
+ // add custom score for some objects according to scorer
+ if (Scorer.objPrio.hasOwnProperty(match[2]))
+ score += Scorer.objPrio[match[2]];
+ else score += Scorer.objPrioDefault;
+
+ results.push([
+ docNames[match[0]],
+ fullname,
+ "#" + anchor,
+ descr,
+ score,
+ filenames[match[0]],
+ SearchResultKind.object,
+ ]);
+ };
+ Object.keys(objects).forEach((prefix) =>
+ objects[prefix].forEach((array) =>
+ objectSearchCallback(prefix, array)
+ )
+ );
+ return results;
+ },
+
+ /**
+ * search for full-text terms in the index
+ */
+ performTermsSearch: (searchTerms, excludedTerms) => {
+ // prepare search
+ const terms = Search._index.terms;
+ const titleTerms = Search._index.titleterms;
+ const filenames = Search._index.filenames;
+ const docNames = Search._index.docnames;
+ const titles = Search._index.titles;
+
+ const scoreMap = new Map();
+ const fileMap = new Map();
+
+ // perform the search on the required terms
+ searchTerms.forEach((word) => {
+ const files = [];
+ const arr = [
+ { files: terms[word], score: Scorer.term },
+ { files: titleTerms[word], score: Scorer.title },
+ ];
+ // add support for partial matches
+ if (word.length > 2) {
+ const escapedWord = _escapeRegExp(word);
+ if (!terms.hasOwnProperty(word)) {
+ Object.keys(terms).forEach((term) => {
+ if (term.match(escapedWord))
+ arr.push({ files: terms[term], score: Scorer.partialTerm });
+ });
+ }
+ if (!titleTerms.hasOwnProperty(word)) {
+ Object.keys(titleTerms).forEach((term) => {
+ if (term.match(escapedWord))
+ arr.push({ files: titleTerms[term], score: Scorer.partialTitle });
+ });
+ }
+ }
+
+ // no match but word was a required one
+ if (arr.every((record) => record.files === undefined)) return;
+
+ // found search word in contents
+ arr.forEach((record) => {
+ if (record.files === undefined) return;
+
+ let recordFiles = record.files;
+ if (recordFiles.length === undefined) recordFiles = [recordFiles];
+ files.push(...recordFiles);
+
+ // set score for the word in each file
+ recordFiles.forEach((file) => {
+ if (!scoreMap.has(file)) scoreMap.set(file, {});
+ scoreMap.get(file)[word] = record.score;
+ });
+ });
+
+ // create the mapping
+ files.forEach((file) => {
+ if (!fileMap.has(file)) fileMap.set(file, [word]);
+ else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word);
+ });
+ });
+
+ // now check if the files don't contain excluded terms
+ const results = [];
+ for (const [file, wordList] of fileMap) {
+ // check if all requirements are matched
+
+ // as search terms with length < 3 are discarded
+ const filteredTermCount = [...searchTerms].filter(
+ (term) => term.length > 2
+ ).length;
+ if (
+ wordList.length !== searchTerms.size &&
+ wordList.length !== filteredTermCount
+ )
+ continue;
+
+ // ensure that none of the excluded terms is in the search result
+ if (
+ [...excludedTerms].some(
+ (term) =>
+ terms[term] === file ||
+ titleTerms[term] === file ||
+ (terms[term] || []).includes(file) ||
+ (titleTerms[term] || []).includes(file)
+ )
+ )
+ break;
+
+ // select one (max) score for the file.
+ const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
+ // add result to the result list
+ results.push([
+ docNames[file],
+ titles[file],
+ "",
+ null,
+ score,
+ filenames[file],
+ SearchResultKind.text,
+ ]);
+ }
+ return results;
+ },
+
+ /**
+ * helper function to return a node containing the
+ * search summary for a given text. keywords is a list
+ * of stemmed words.
+ */
+ makeSearchSummary: (htmlText, keywords, anchor) => {
+ const text = Search.htmlToText(htmlText, anchor);
+ if (text === "") return null;
+
+ const textLower = text.toLowerCase();
+ const actualStartPosition = [...keywords]
+ .map((k) => textLower.indexOf(k.toLowerCase()))
+ .filter((i) => i > -1)
+ .slice(-1)[0];
+ const startWithContext = Math.max(actualStartPosition - 120, 0);
+
+ const top = startWithContext === 0 ? "" : "...";
+ const tail = startWithContext + 240 < text.length ? "..." : "";
+
+ let summary = document.createElement("p");
+ summary.classList.add("context");
+ summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
+
+ return summary;
+ },
+};
+
+_ready(Search.init);
diff --git a/docs/sphinx/build/html/_static/sphinx_highlight.js b/docs/sphinx/build/html/_static/sphinx_highlight.js
new file mode 100644
index 000000000..8a96c69a1
--- /dev/null
+++ b/docs/sphinx/build/html/_static/sphinx_highlight.js
@@ -0,0 +1,154 @@
+/* Highlighting utilities for Sphinx HTML documentation. */
+"use strict";
+
+const SPHINX_HIGHLIGHT_ENABLED = true
+
+/**
+ * highlight a given string on a node by wrapping it in
+ * span elements with the given class name.
+ */
+const _highlight = (node, addItems, text, className) => {
+ if (node.nodeType === Node.TEXT_NODE) {
+ const val = node.nodeValue;
+ const parent = node.parentNode;
+ const pos = val.toLowerCase().indexOf(text);
+ if (
+ pos >= 0 &&
+ !parent.classList.contains(className) &&
+ !parent.classList.contains("nohighlight")
+ ) {
+ let span;
+
+ const closestNode = parent.closest("body, svg, foreignObject");
+ const isInSVG = closestNode && closestNode.matches("svg");
+ if (isInSVG) {
+ span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
+ } else {
+ span = document.createElement("span");
+ span.classList.add(className);
+ }
+
+ span.appendChild(document.createTextNode(val.substr(pos, text.length)));
+ const rest = document.createTextNode(val.substr(pos + text.length));
+ parent.insertBefore(
+ span,
+ parent.insertBefore(
+ rest,
+ node.nextSibling
+ )
+ );
+ node.nodeValue = val.substr(0, pos);
+ /* There may be more occurrences of search term in this node. So call this
+ * function recursively on the remaining fragment.
+ */
+ _highlight(rest, addItems, text, className);
+
+ if (isInSVG) {
+ const rect = document.createElementNS(
+ "http://www.w3.org/2000/svg",
+ "rect"
+ );
+ const bbox = parent.getBBox();
+ rect.x.baseVal.value = bbox.x;
+ rect.y.baseVal.value = bbox.y;
+ rect.width.baseVal.value = bbox.width;
+ rect.height.baseVal.value = bbox.height;
+ rect.setAttribute("class", className);
+ addItems.push({ parent: parent, target: rect });
+ }
+ }
+ } else if (node.matches && !node.matches("button, select, textarea")) {
+ node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
+ }
+};
+const _highlightText = (thisNode, text, className) => {
+ let addItems = [];
+ _highlight(thisNode, addItems, text, className);
+ addItems.forEach((obj) =>
+ obj.parent.insertAdjacentElement("beforebegin", obj.target)
+ );
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const SphinxHighlight = {
+
+ /**
+ * highlight the search words provided in localstorage in the text
+ */
+ highlightSearchWords: () => {
+ if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
+
+ // get and clear terms from localstorage
+ const url = new URL(window.location);
+ const highlight =
+ localStorage.getItem("sphinx_highlight_terms")
+ || url.searchParams.get("highlight")
+ || "";
+ localStorage.removeItem("sphinx_highlight_terms")
+ url.searchParams.delete("highlight");
+ window.history.replaceState({}, "", url);
+
+ // get individual terms from highlight string
+ const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
+ if (terms.length === 0) return; // nothing to do
+
+ // There should never be more than one element matching "div.body"
+ const divBody = document.querySelectorAll("div.body");
+ const body = divBody.length ? divBody[0] : document.querySelector("body");
+ window.setTimeout(() => {
+ terms.forEach((term) => _highlightText(body, term, "highlighted"));
+ }, 10);
+
+ const searchBox = document.getElementById("searchbox");
+ if (searchBox === null) return;
+ searchBox.appendChild(
+ document
+ .createRange()
+ .createContextualFragment(
+ '
' +
+ '' +
+ _("Hide Search Matches") +
+ "
"
+ )
+ );
+ },
+
+ /**
+ * helper function to hide the search marks again
+ */
+ hideSearchWords: () => {
+ document
+ .querySelectorAll("#searchbox .highlight-link")
+ .forEach((el) => el.remove());
+ document
+ .querySelectorAll("span.highlighted")
+ .forEach((el) => el.classList.remove("highlighted"));
+ localStorage.removeItem("sphinx_highlight_terms")
+ },
+
+ initEscapeListener: () => {
+ // only install a listener if it is really needed
+ if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
+
+ document.addEventListener("keydown", (event) => {
+ // bail for input elements
+ if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+ // bail with special keys
+ if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
+ if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
+ SphinxHighlight.hideSearchWords();
+ event.preventDefault();
+ }
+ });
+ },
+};
+
+_ready(() => {
+ /* Do not call highlightSearchWords() when we are on the search page.
+ * It will highlight words from the *previous* search query.
+ */
+ if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
+ SphinxHighlight.initEscapeListener();
+});
diff --git a/docs/sphinx/build/html/api/action.html b/docs/sphinx/build/html/api/action.html
new file mode 100644
index 000000000..529fedcc7
--- /dev/null
+++ b/docs/sphinx/build/html/api/action.html
@@ -0,0 +1,425 @@
+
+
+
+
+
+
+
+
+
Action Space — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+Action Space
+The action space defines how agents interact with the Factorio Learning Environment through Python code synthesis.
+
+Action Structure
+Actions are defined by the Action class:
+
+
+class fle.env.gym_env.action. Action ( code , agent_idx = 0 , game_state = None ) [source]
+Bases: object
+Action for the Factorio gym environment
+
+
+code : str
+
+
+
+
+agent_idx : int = 0
+
+
+
+
+game_state : Optional [ GameState ] = None
+
+
+
+
+to_dict ( ) [source]
+Convert action to dictionary format expected by the environment
+
+Return type:
+Dict [str , Any ]
+
+
+
+
+
+
+__init__ ( code , agent_idx = 0 , game_state = None )
+
+
+
+
+
+
+Action Components
+
+agent_idx Index of the agent taking the action (for multi-agent environments)
+
+code Python code to execute in the game environment
+
+game_state Optional game state to reset to before running code
+
+
+
+
+Action Space Definition
+The action space follows this structure:
+{
+ 'agent_idx' : Discrete ( instance . num_agents ), # Index of the agent taking the action
+ 'game_state' : Text ( max_length = 1000000 ), # Optional: game state to reset to before running code
+ 'code' : Text ( max_length = 10000 ) # Python code to execute
+}
+
+
+
+
+Code Execution
+The environment executes Python code in a controlled namespace that includes:
+
+Standard Library Full Python standard library access
+
+FLE Tools All available tools for game interaction
+
+Namespace Persistence Variables and functions persist between actions
+
+Error Handling Comprehensive exception handling with detailed error messages
+
+
+
+
+Example Actions
+
+Basic Movement action = Action (
+ agent_idx = 0 ,
+ code = 'position = get_position()' ,
+ game_state = None
+)
+
+
+
+Entity Placement action = Action (
+ agent_idx = 0 ,
+ code = '''
+drill = place_entity(
+ entity=Prototype.MiningDrill,
+ position=nearest(Resource.IronOre),
+ direction=Direction.NORTH
+)
+''' ,
+ game_state = None
+)
+
+
+
+Complex Automation action = Action (
+ agent_idx = 0 ,
+ code = '''
+# Get iron patch and place mining drill
+drill = place_entity(
+ entity=Prototype.MiningDrill,
+ position=nearest(Resource.IronOre),
+ direction=Direction.NORTH
+)
+# Add output storage
+chest = place_entity_next_to(
+ entity=Prototype.IronChest,
+ reference_position=drill.drop_position,
+ direction=Direction.SOUTH
+)
+# Verify automation chain
+sleep(10)
+assert drill.status == EntityStatus.WORKING
+print(get_entities())
+''' ,
+ game_state = None
+)
+
+
+
+Function Definition action = Action (
+ agent_idx = 0 ,
+ code = '''
+def place_mining_setup(resource_type, direction):
+ drill = place_entity(
+ entity=Prototype.MiningDrill,
+ position=nearest(resource_type),
+ direction=direction
+ )
+ chest = place_entity_next_to(
+ entity=Prototype.IronChest,
+ reference_position=drill.drop_position,
+ direction=Direction.SOUTH
+ )
+ return drill, chest
+
+# Use the function
+drill, chest = place_mining_setup(Resource.IronOre, Direction.NORTH)
+''' ,
+ game_state = None
+)
+
+
+
+Class Definition action = Action (
+ agent_idx = 0 ,
+ code = '''
+class MiningOperation:
+ def __init__(self, resource_type, position):
+ self.resource_type = resource_type
+ self.position = position
+ self.drill = None
+ self.chest = None
+
+ def setup(self):
+ self.drill = place_entity(
+ entity=Prototype.MiningDrill,
+ position=self.position,
+ direction=Direction.NORTH
+ )
+ self.chest = place_entity_next_to(
+ entity=Prototype.IronChest,
+ reference_position=self.drill.drop_position,
+ direction=Direction.SOUTH
+ )
+
+ def is_working(self):
+ return self.drill.status == EntityStatus.WORKING
+
+# Create and use the class
+mining_op = MiningOperation(Resource.IronOre, nearest(Resource.IronOre))
+mining_op.setup()
+print(f"Mining operation working: {mining_op.is_working()}")
+''' ,
+ game_state = None
+)
+
+
+
+
+
+
+Error Handling
+The environment provides comprehensive error handling:
+
+Syntax Errors Python syntax errors are caught and reported with line numbers
+
+Runtime Errors Exceptions during code execution are captured with full stack traces
+
+Tool Errors Invalid tool usage is reported with detailed error messages
+
+Assertion Failures Failed assertions provide context about expected vs actual values
+
+
+
+
+Example Error Handling
+# Invalid tool usage
+action = Action (
+ agent_idx = 0 ,
+ code = 'place_entity(entity="invalid", position=(0, 0))' ,
+ game_state = None
+)
+
+# Results in error message:
+# ValueError: Invalid entity type 'invalid'. Expected Prototype enum value.
+
+
+
+Debugging Support The environment provides debugging information:
+
+Variable Inspection : Access to all namespace variables
+Function Signatures : Available functions and their parameters
+Entity State : Current state of all game entities
+Error Context : Detailed error information with suggestions
+
+
+
+
+
+Multi-Agent Actions
+For multi-agent environments, actions can be coordinated:
+# Agent 0 places a drill
+action_0 = Action (
+ agent_idx = 0 ,
+ code = 'drill = place_entity(entity=Prototype.MiningDrill, position=nearest(Resource.IronOre))' ,
+ game_state = None
+)
+
+# Agent 1 places a chest next to it
+action_1 = Action (
+ agent_idx = 1 ,
+ code = 'chest = place_entity_next_to(entity=Prototype.IronChest, reference_position=drill.drop_position)' ,
+ game_state = None
+)
+
+
+
+
+Action Validation
+The environment validates actions before execution:
+
+Agent Index : Ensures valid agent index
+Code Length : Limits code to prevent resource exhaustion
+Game State : Validates game state format if provided
+Tool Availability : Ensures requested tools are available
+
+
+
+Best Practices
+
+Use Descriptive Variable Names : Make code readable and maintainable
+Handle Errors Gracefully : Use try-except blocks for robust code
+Leverage Namespace : Store useful objects for later reference
+Use Functions : Encapsulate common operations
+Debug with Print : Use print statements to monitor execution
+Assert Conditions : Use assertions to verify expected behavior
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/api/environment.html b/docs/sphinx/build/html/api/environment.html
new file mode 100644
index 000000000..d2a50b91f
--- /dev/null
+++ b/docs/sphinx/build/html/api/environment.html
@@ -0,0 +1,439 @@
+
+
+
+
+
+
+
+
+
Environment API — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+ Environment API
+
+
+
+
+
+
+
+
+
+Environment API
+The Factorio Learning Environment provides a comprehensive API for interacting with the game through Python code synthesis.
+
+Core Concepts
+
+FactorioInstance The main interface for interacting with a Factorio game instance. Provides access to all game state and tools.
+
+Namespace Management Python namespace that persists across agent actions, allowing for stateful interactions and code reuse.
+
+Gym Environment Integration Standard OpenAI Gym interface for reinforcement learning integration.
+
+
+
+
+FactorioInstance
+
+
+class fle.env.instance. FactorioInstance ( address = 'localhost' , fast = True , tcp_port = 27000 , inventory = {} , cache_scripts = True , all_technologies_researched = True , clear_entities = True , peaceful = True , num_agents = 1 , reset_speed = 10 , reset_paused = False , ** kwargs ) [source]
+Bases: object
+
+
+namespace_class
+alias of FactorioNamespace
+
+
+
+
+__init__ ( address = 'localhost' , fast = True , tcp_port = 27000 , inventory = {} , cache_scripts = True , all_technologies_researched = True , clear_entities = True , peaceful = True , num_agents = 1 , reset_speed = 10 , reset_paused = False , ** kwargs ) [source]
+
+
+
+
+property namespace
+
+
+
+
+property first_namespace : FactorioNamespace | None
+
+
+
+
+property is_multiagent
+
+
+
+
+reset ( game_state = None , reset_position = False , all_technologies_researched = True , clear_entities = True ) [source]
+
+
+
+
+set_speed ( speed ) [source]
+Set game speed (only affects speed when unpaused)
+
+
+
+
+get_speed ( ) [source]
+Get current speed setting (regardless of pause state)
+
+Return type:
+float
+
+
+
+
+
+
+get_elapsed_ticks ( ) [source]
+Get the number of ticks elapsed since the game started
+
+
+
+
+pause ( ) [source]
+Pause the game (preserves speed setting)
+
+
+
+
+unpause ( ) [source]
+Unpause the game (restores previous speed)
+
+
+
+
+set_speed_and_unpause ( speed ) [source]
+Set speed and ensure game is unpaused - common use case
+
+
+
+
+get_system_prompt ( agent_idx = 0 ) [source]
+Get the system prompt for the Factorio environment.
+This includes all the available actions, objects, and entities that the agent can interact with.
+We get the system prompt by loading the schema, definitions, and entity definitions from their source files.
+These are converted to their signatures - leaving out the implementations.
+:rtype: str
+:return:
+
+
+
+
+static connect_to_server ( address , tcp_port ) [source]
+
+
+
+
+eval_with_error ( expr , agent_idx = 0 , timeout = 60 ) [source]
+Evaluate an expression with a timeout, and return the result without error handling
+
+
+
+
+eval ( expr , agent_idx = 0 , timeout = 60 ) [source]
+Evaluate several lines of input, returning the result of the last line with a timeout
+
+
+
+
+initialise ( fast = True , all_technologies_researched = True , clear_entities = True ) [source]
+
+
+
+
+get_warnings ( seconds = 10 ) [source]
+Get all alerts that have been raised before the last n seconds
+:type seconds:
+:param seconds: The number of seconds to look back
+:return:
+
+
+
+
+cleanup ( ) [source]
+
+
+
+
+
+Key Methods
+
+
+FactorioInstance. reset ( game_state = None , reset_position = False , all_technologies_researched = True , clear_entities = True ) [source]
+
+
+
+
+
+Namespace Management
+The namespace provides:
+
+Variable Storage : Store and retrieve objects between actions
+Function Definitions : Define reusable functions
+Class Definitions : Create custom data structures
+Import Management : Handle Python imports and modules
+
+
+
+Gym Environment
+The gym environment provides:
+
+Standard Interface : Compatible with OpenAI Gym
+Action Space : Structured action space for agent actions
+Observation Space : Rich observation space with game state
+Reward System : Configurable reward functions
+
+
+
+Environment Registry
+FLE uses a gym environment registry to automatically discover and register all available tasks.
+
+
+fle.env.gym_env.registry. list_available_environments ( ) [source]
+List all available gym environment IDs
+
+Return type:
+List [str ]
+
+
+
+
+
+
+fle.env.gym_env.registry. get_environment_info ( task_key ) [source]
+Get detailed information about a specific environment
+
+Return type:
+Optional [Dict [str , Any ]]
+
+
+
+
+
+
+fle.env.gym_env.registry. register_all_environments ( ) [source]
+Register all discovered environments with gym
+
+Return type:
+None
+
+
+
+
+
+Available Environments
+
+Throughput Tasks (Lab Play) All throughput tasks are defined in fle/eval/tasks/task_definitions/lab_play/throughput_tasks.py . The 24 available tasks are:
+
+Circuits : advanced_circuit_throughput , electronic_circuit_throughput , processing_unit_throughput
+Science Packs : automation_science_pack_throughput , logistics_science_pack_throughput , chemical_science_pack_throughput , military_science_pack_throughput , production_science_pack_throughput , utility_science_pack_throughput
+Components : battery_throughput , engine_unit_throughput , inserter_throughput , iron_gear_wheel_throughput , low_density_structure_throughput
+Raw Materials : iron_ore_throughput , iron_plate_throughput , steel_plate_throughput , plastic_bar_throughput
+Oil & Chemicals : crude_oil_throughput , petroleum_gas_throughput , sufuric_acid_throughput , sulfur_throughput
+Military : piercing_round_throughput , stone_wall_throughput
+
+Most tasks require 16 items per 60 seconds; fluid tasks require 250 units per 60 seconds.
+
+Open Play Unbounded task of building the largest possible factory: open_play
+
+
+
+
+
+Example Usage
+import gym
+from fle.env.gym_env.action import Action
+
+# Create any available environment
+env = gym . make ( "iron_ore_throughput" )
+
+# Reset the environment
+obs = env . reset ( options = { 'game_state' : None })
+
+# Take an action
+action = Action (
+ agent_idx = 0 , # Which agent takes the action
+ code = 'print("Hello Factorio!")' , # Python code to execute
+ game_state = None # Optional: game state to reset to before running code
+)
+
+# Execute the action
+obs , reward , terminated , truncated , info = env . step ( action )
+
+# Clean up
+env . close ()
+
+
+
+
+Error Handling
+The environment includes comprehensive error handling for:
+
+Missing task definition files
+Invalid JSON configurations
+Missing Factorio containers
+Environment creation failures
+Network connectivity issues
+
+If an environment fails to load, a warning will be printed but the registry will continue to load other environments.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/api/modules.html b/docs/sphinx/build/html/api/modules.html
new file mode 100644
index 000000000..377b4a12b
--- /dev/null
+++ b/docs/sphinx/build/html/api/modules.html
@@ -0,0 +1,315 @@
+
+
+
+
+
+
+
+
+
API Modules — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+API Modules
+This section contains the complete API reference for all FLE modules.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/api/modules/fle.agents.agent_abc.html b/docs/sphinx/build/html/api/modules/fle.agents.agent_abc.html
new file mode 100644
index 000000000..2751300ed
--- /dev/null
+++ b/docs/sphinx/build/html/api/modules/fle.agents.agent_abc.html
@@ -0,0 +1,253 @@
+
+
+
+
+
+
+
+
+
fle.agents.agent_abc module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+fle.agents.agent_abc module
+
+
+class fle.agents.agent_abc. AgentABC ( model , system_prompt , * args , ** kwargs ) [source]
+Bases: object
+
+
+__init__ ( model , system_prompt , * args , ** kwargs ) [source]
+
+
+
+
+model : str
+
+
+
+
+system_prompt : str
+
+
+
+
+conversation : Conversation
+
+
+
+
+get_agent_card ( ) [source]
+Get the agent card for this agent
+
+Return type:
+AgentCard
+
+
+
+
+
+
+set_conversation ( conversation ) [source]
+Overrides the current conversation state for this agent. This is useful for context modification strategies,
+such as summarisation or injection (i.e RAG).
+@param conversation: The new conversation state.
+@return:
+
+Return type:
+None
+
+
+
+
+
+
+abstract async step ( conversation , response , namespace ) [source]
+A single step in a trajectory. This method should return the next policy to be executed, based on the last response.
+@param conversation: The current state of the conversation.
+@param response: The most recent response from the environment.
+@param namespace: The current namespace of the conversation, containing declared variables and functions.
+@return:
+
+Return type:
+Policy
+
+
+
+
+
+
+abstract async end ( conversation , completion ) [source]
+Cleanup for when a trajectory ends
+
+
+
+
+check_step_completion ( response ) [source]
+Check if the agent should complete its turn and if the state should be updated
+:returns: bool, True if the state should be updated
+
+
+
+Return type:
+
+
+
+
+
+
+
+
+
+
+fle.agents.agent_abc. create_default_agent_card ( name ) [source]
+Create a default A2A agent card describing a Factorio agent’s capabilities
+
+Return type:
+AgentCard
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/api/modules/fle.agents.models.html b/docs/sphinx/build/html/api/modules/fle.agents.models.html
new file mode 100644
index 000000000..dc11a5a3d
--- /dev/null
+++ b/docs/sphinx/build/html/api/modules/fle.agents.models.html
@@ -0,0 +1,290 @@
+
+
+
+
+
+
+
+
+
fle.agents.models module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+fle.agents.models module
+
+
+class fle.agents.models. TaskResponse ( ** data ) [source]
+Bases: BaseModel
+
+
+meta : Dict [ str , Any ]
+
+
+
+
+success : bool
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.agents.models. Response ( ** data ) [source]
+Bases: BaseModel
+
+
+score : float
+
+
+
+
+achievements : Dict [ Any , Any ]
+
+
+
+
+flows : ProductionFlows
+
+
+
+
+task : TaskResponse
+
+
+
+
+step : int
+
+
+
+
+ticks : int
+
+
+
+
+code : str
+
+
+
+
+created_at : datetime
+
+
+
+
+response : str
+
+
+
+
+error : bool
+
+
+
+
+program_id : Optional [ int ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.agents.models. CompletionReason ( value ) [source]
+Bases: Enum
+An enumeration.
+
+
+TIMEOUT = 'timeout'
+
+
+
+
+SUCCESS = 'success'
+
+
+
+
+RUNTIME_ERROR = 'runtime_error'
+
+
+
+
+
+
+class fle.agents.models. CompletionResult ( ** data ) [source]
+Bases: BaseModel
+
+
+step : int
+
+
+
+
+reason : CompletionReason
+
+
+
+
+metadata : Dict [ str , Any ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/api/modules/fle.commons.models.html b/docs/sphinx/build/html/api/modules/fle.commons.models.html
new file mode 100644
index 000000000..237778b35
--- /dev/null
+++ b/docs/sphinx/build/html/api/modules/fle.commons.models.html
@@ -0,0 +1,876 @@
+
+
+
+
+
+
+
+
+
fle.commons.models module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+fle.commons.models module
+Common data models for the Factorio Learning Environment.
+This module contains all the core data models used throughout the FLE system,
+including game state management, conversation tracking, research states,
+and various utility models.
+
+
+class fle.commons.models. GameState ( entities , inventories , research , timestamp=<factory> , namespaces=<factory> , agent_messages=<factory> ) [source]
+Bases: object
+Serializable Factorio game state
+
+
+entities : str
+
+
+
+
+inventories : List [ Any ]
+
+
+
+
+research : Optional [ ResearchState ]
+
+
+
+
+timestamp : float
+
+
+
+
+namespaces : List [ bytes ]
+
+
+
+
+agent_messages : List [ Any ]
+
+
+
+
+property is_multiagent : bool
+
+
+
+
+property num_agents : int
+
+
+
+
+parse_agent_messages ( ) [source]
+
+Return type:
+List [Any ]
+
+
+
+
+
+
+classmethod from_instance ( instance ) [source]
+Capture current game state from Factorio instances
+
+Return type:
+GameState
+
+
+
+
+
+
+classmethod parse_raw ( json_str ) [source]
+
+Return type:
+GameState
+
+
+
+
+
+
+classmethod parse ( data ) [source]
+
+Return type:
+GameState
+
+
+
+
+
+
+to_raw ( ) [source]
+Convert state to JSON string
+
+Return type:
+str
+
+
+
+
+
+
+to_instance ( instance ) [source]
+Restore game state to a Factorio instance
+
+
+
+
+__init__ ( entities , inventories , research , timestamp=<factory> , namespaces=<factory> , agent_messages=<factory> )
+
+
+
+
+
+
+class fle.commons.models. ResearchState ( technologies , current_research , research_progress , research_queue , progress ) [source]
+Bases: object
+Complete research state including all technologies and current research
+
+
+technologies : Dict [ str , TechnologyState ]
+
+
+
+
+current_research : Optional [ str ]
+
+
+
+
+research_progress : float
+
+
+
+
+research_queue : List [ str ]
+
+
+
+
+progress : Dict
+
+
+
+
+__init__ ( technologies , current_research , research_progress , research_queue , progress )
+
+
+
+
+
+
+class fle.commons.models. TechnologyState ( name , researched , enabled , level , research_unit_count , research_unit_energy , prerequisites , ingredients ) [source]
+Bases: object
+Represents the state of a technology
+
+
+name : str
+
+
+
+
+researched : bool
+
+
+
+
+enabled : bool
+
+
+
+
+level : int
+
+
+
+
+research_unit_count : int
+
+
+
+
+research_unit_energy : float
+
+
+
+
+prerequisites : List [ str ]
+
+
+
+
+ingredients : List [ Dict [ str , int ]]
+
+
+
+
+__init__ ( name , researched , enabled , level , research_unit_count , research_unit_energy , prerequisites , ingredients )
+
+
+
+
+
+
+fle.commons.models. filter_serializable_vars ( vars_dict ) [source]
+Filter dictionary to only include serializable items
+
+Return type:
+Dict [str , Any ]
+
+
+
+
+
+
+class fle.commons.models. Conversation ( ** data ) [source]
+Bases: BaseModel
+Tracks dialogue between LLM and Factorio
+
+
+messages : List [ Message ]
+
+
+
+
+classmethod parse_raw ( data ) [source]
+
+Return type:
+Conversation
+
+
+
+
+
+
+set_system_message ( message ) [source]
+
+
+
+
+add_agent_message ( message , ** kwargs ) [source]
+
+
+
+
+add_user_message ( message , ** kwargs ) [source]
+
+
+
+
+add_result ( program , response , ** kwargs ) [source]
+Add program execution result to conversation
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.commons.models. Message ( ** data ) [source]
+Bases: BaseModel
+
+
+role : str
+
+
+
+
+content : str
+
+
+
+
+metadata : Dict [ str , Any ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.commons.models. Program ( ** data ) [source]
+Bases: BaseModel
+
+
+id : Optional [ int ]
+
+
+
+
+code : str
+
+
+
+
+conversation : Conversation
+
+
+
+
+value : float
+
+
+
+
+visits : int
+
+
+
+
+parent_id : Optional [ int ]
+
+
+
+
+state : Optional [ GameState ]
+
+
+
+
+raw_reward : Optional [ float ]
+
+
+
+
+holdout_value : Optional [ float ]
+
+
+
+
+created_at : datetime
+
+
+
+
+prompt_token_usage : Optional [ int ]
+
+
+
+
+completion_token_usage : Optional [ int ]
+
+
+
+
+token_usage : Optional [ int ]
+
+
+
+
+response : Optional [ str ]
+
+
+
+
+version : int
+
+
+
+
+version_description : Optional [ str ]
+
+
+
+
+model : str
+
+
+
+
+meta : dict
+
+
+
+
+achievements : dict
+
+
+
+
+instance : int
+
+
+
+
+depth : int
+
+
+
+
+advantage : float
+
+
+
+
+ticks : int
+
+
+
+
+flows : Optional [ ProductionFlows ]
+
+
+
+
+timing_metrics : List [ TimingMetrics ]
+
+
+
+
+get_step ( ) [source]
+
+
+
+
+get_uct ( parent_visits , exploration_constant = 1.41 ) [source]
+
+Return type:
+float
+
+
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+classmethod from_row ( row ) [source]
+
+
+
+
+
+
+class fle.commons.models. SerializableFunction ( func , instance = None ) [source]
+Bases: object
+Wrapper to make function objects serializable and callable with signature information
+
+
+__init__ ( func , instance = None ) [source]
+Initialize with a function
+
+
+
+
+__getstate__ ( ) [source]
+Control which attributes are pickled
+
+
+
+
+__setstate__ ( state ) [source]
+Restore state after unpickling
+
+
+
+
+__str__ ( ) [source]
+Return a string representation with function signature and docstring
+
+
+
+
+bind ( instance ) [source]
+Bind this function to an instance after unpickling
+
+
+
+
+__call__ ( * args , ** kwargs ) [source]
+Make the serialized function directly callable
+
+
+
+
+static reconstruct ( instance , func_data ) [source]
+Reconstruct a function with proper globals from the instance
+
+
+
+
+
+
+class fle.commons.models. ProfitConfig ( max_static_unit_profit_cap = 5.0 , dynamic_profit_multiplier = 10.0 ) [source]
+Bases: object
+Configuration for profit calculations.
+
+
+max_static_unit_profit_cap : float = 5.0
+
+
+
+
+dynamic_profit_multiplier : float = 10.0
+
+
+
+
+__init__ ( max_static_unit_profit_cap = 5.0 , dynamic_profit_multiplier = 10.0 )
+
+
+
+
+
+
+class fle.commons.models. ProductionFlows ( input , output , crafted , harvested , price_list = None , static_items = None ) [source]
+Bases: object
+Represents production flow data.
+
+
+input : Dict [ str , float ]
+
+
+
+
+output : Dict [ str , float ]
+
+
+
+
+crafted : List [ Dict [ str , Any ]]
+
+
+
+
+harvested : Dict [ str , float ]
+
+
+
+
+price_list : Optional [ Dict [ str , float ]] = None
+
+
+
+
+static_items : Optional [ Dict [ str , float ]] = None
+
+
+
+
+classmethod from_dict ( data ) [source]
+Create ProductionFlows from a dictionary.
+
+Return type:
+ProductionFlows
+
+
+
+
+
+
+to_dict ( ) [source]
+Convert ProductionFlows to a dictionary.
+
+Return type:
+Dict [str , Any ]
+
+
+
+
+
+
+is_valid ( ) [source]
+Check if the production flows data is valid.
+
+Return type:
+bool
+
+
+
+
+
+
+get_new_flows ( post ) [source]
+Calculate new production flows between two states.
+
+Return type:
+ProductionFlows
+
+
+
+
+
+
+__init__ ( input , output , crafted , harvested , price_list = None , static_items = None )
+
+
+
+
+
+
+class fle.commons.models. GenerationParameters ( ** data ) [source]
+Bases: BaseModel
+
+
+model : str
+
+
+
+
+n : int
+
+
+
+
+temperature : float
+
+
+
+
+max_tokens : int
+
+
+
+
+logit_bias : Optional [ Dict [ str , float ]]
+
+
+
+
+stop_sequences : Optional [ List ]
+
+
+
+
+presence_penalty : Optional [ float ]
+
+
+
+
+frequency_penalty : Optional [ float ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.commons.models. TimingMetrics ( ** data ) [source]
+Bases: BaseModel
+Stores timing metrics for a single operation
+
+
+operation_name : str
+
+
+
+
+start_time : float
+
+
+
+
+end_time : Optional [ float ]
+
+
+
+
+children : List [TimingMetrics]
+
+
+
+
+metadata : Dict [ str , Any ]
+
+
+
+
+property duration : float
+Get duration in seconds
+
+
+
+
+property total_duration : float
+Get total duration including children
+
+
+
+
+to_dict ( ) [source]
+Convert metrics to dictionary format
+
+Return type:
+Dict [str , Any ]
+
+
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/api/modules/fle.env.entities.html b/docs/sphinx/build/html/api/modules/fle.env.entities.html
new file mode 100644
index 000000000..e908e13f3
--- /dev/null
+++ b/docs/sphinx/build/html/api/modules/fle.env.entities.html
@@ -0,0 +1,2741 @@
+
+
+
+
+
+
+
+
+
fle.env.entities module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+fle.env.entities module
+
+
+class fle.env.entities. Layer ( value ) [source]
+Bases: IntFlag
+Enum representing different layers that can be rendered on the map
+
+
+NONE = 0
+
+
+
+
+GRID = 1
+
+
+
+
+WATER = 2
+
+
+
+
+RESOURCES = 4
+
+
+
+
+TREES = 8
+
+
+
+
+ROCKS = 16
+
+
+
+
+ENTITIES = 32
+
+
+
+
+CONNECTIONS = 64
+
+
+
+
+ORIGIN = 128
+
+
+
+
+PLAYER = 256
+
+
+
+
+LABELS = 512
+
+
+
+
+ELECTRICITY = 1024
+
+
+
+
+NATURAL = 24
+
+
+
+
+ALL = 2047
+
+
+
+
+
+
+class fle.env.entities. EntityStatus ( value ) [source]
+Bases: Enum
+An enumeration.
+
+
+WORKING = 'working'
+
+
+
+
+NORMAL = 'normal'
+
+
+
+
+NO_POWER = 'no_power'
+
+
+
+
+LOW_POWER = 'low_power'
+
+
+
+
+NO_FUEL = 'no_fuel'
+
+
+
+
+EMPTY = 'empty'
+
+
+
+
+NOT_PLUGGED_IN_ELECTRIC_NETWORK = 'not_plugged_in_electric_network'
+
+
+
+
+CHARGING = 'charging'
+
+
+
+
+DISCHARGING = 'discharging'
+
+
+
+
+FULLY_CHARGED = 'fully_charged'
+
+
+
+
+NO_RECIPE = 'no_recipe'
+
+
+
+
+NO_INGREDIENTS = 'no_ingredients'
+
+
+
+
+NOT_CONNECTED = 'not_connected'
+
+
+
+
+NO_INPUT_FLUID = 'no_input_fluid'
+
+
+
+
+NO_RESEARCH_IN_PROGRESS = 'no_research_in_progress'
+
+
+
+
+NO_MINABLE_RESOURCES = 'no_minable_resources'
+
+
+
+
+LOW_INPUT_FLUID = 'low_input_fluid'
+
+
+
+
+FLUID_INGREDIENT_SHORTAGE = 'fluid_ingredient_shortage'
+
+
+
+
+FULL_OUTPUT = 'full_output'
+
+
+
+
+FULL_BURNT_RESULT_OUTPUT = 'full_burnt_result_output'
+
+
+
+
+ITEM_INGREDIENT_SHORTAGE = 'item_ingredient_shortage'
+
+
+
+
+MISSING_REQUIRED_FLUID = 'missing_required_fluid'
+
+
+
+
+MISSING_SCIENCE_PACKS = 'missing_science_packs'
+
+
+
+
+WAITING_FOR_SOURCE_ITEMS = 'waiting_for_source_items'
+
+
+
+
+WAITING_FOR_SPACE_IN_DESTINATION = 'waiting_for_space_in_destination'
+
+
+
+
+PREPARING_ROCKET_FOR_LAUNCH = 'preparing_rocket_for_launch'
+
+
+
+
+WAITING_TO_LAUNCH_ROCKET = 'waiting_to_launch_rocket'
+
+
+
+
+LAUNCHING_ROCKET = 'launching_rocket'
+
+
+
+
+NO_AMMO = 'no_ammo'
+
+
+
+
+LOW_TEMPERATURE = 'low_temperature'
+
+
+
+
+NOT_CONNECTED_TO_RAIL = 'not_connected_to_rail'
+
+
+
+
+classmethod from_string ( status_string ) [source]
+
+
+
+
+classmethod from_int ( status_int ) [source]
+
+
+
+
+
+
+class fle.env.entities. Inventory ( ** data ) [source]
+Bases: BaseModel
+
+
+model_config : ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+get ( key , default = 0 ) [source]
+
+Return type:
+int
+
+
+
+
+
+
+items ( ) [source]
+
+
+
+
+keys ( ) [source]
+
+
+
+
+values ( ) [source]
+
+
+
+
+serialize_model ( ) [source]
+
+
+
+
+
+
+class fle.env.entities. Direction ( value ) [source]
+Bases: Enum
+An enumeration.
+
+
+UP = 0
+
+
+
+
+NORTH = 0
+
+
+
+
+RIGHT = 2
+
+
+
+
+EAST = 2
+
+
+
+
+DOWN = 4
+
+
+
+
+SOUTH = 4
+
+
+
+
+LEFT = 6
+
+
+
+
+WEST = 6
+
+
+
+
+classmethod from_string ( direction_string ) [source]
+
+
+
+
+
+
+class fle.env.entities. Position ( * args , x : float , y : float ) [source]
+Bases: BaseModel
+
+
+x : float
+
+
+
+
+y : float
+
+
+
+
+__init__ ( * args , ** kwargs ) [source]
+Create a new model by parsing and validating input data from keyword arguments.
+Raises [ValidationError ][pydantic_core.ValidationError] if the input data cannot be
+validated to form a valid model.
+self is explicitly positional-only to allow self as a field name.
+
+
+
+
+classmethod parse_args ( values ) [source]
+
+
+
+
+is_close ( a , tolerance = 0.5 ) [source]
+
+Return type:
+bool
+
+
+
+
+
+
+distance ( a ) [source]
+
+Return type:
+float
+
+
+
+
+
+
+above ( * args ) [source]
+
+Return type:
+Position
+
+
+
+
+
+
+up ( * args ) [source]
+
+Return type:
+Position
+
+
+
+
+
+
+below ( * args ) [source]
+
+Return type:
+Position
+
+
+
+
+
+
+down ( * args ) [source]
+
+Return type:
+Position
+
+
+
+
+
+
+left ( * args ) [source]
+
+Return type:
+Position
+
+
+
+
+
+
+right ( * args ) [source]
+
+Return type:
+Position
+
+
+
+
+
+
+to_bounding_box ( other ) [source]
+
+Return type:
+BoundingBox
+
+
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. IndexedPosition ( * args , x : float , y : float , type : str ) [source]
+Bases: Position
+
+
+type : str
+
+
+
+
+__init__ ( * args , ** kwargs ) [source]
+Create a new model by parsing and validating input data from keyword arguments.
+Raises [ValidationError ][pydantic_core.ValidationError] if the input data cannot be
+validated to form a valid model.
+self is explicitly positional-only to allow self as a field name.
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. EntityInfo ( ** data ) [source]
+Bases: BaseModel
+
+
+name : str
+
+
+
+
+direction : int
+
+
+
+
+position : Position
+
+
+
+
+start_position : Optional [ Position ]
+
+
+
+
+end_position : Optional [ Position ]
+
+
+
+
+quantity : Optional [ int ]
+
+
+
+
+warning : Optional [ str ]
+
+
+
+
+contents : Dict [ str , int ]
+
+
+
+
+status : EntityStatus
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. InspectionResults ( ** data ) [source]
+Bases: BaseModel
+
+
+entities : List [ EntityInfo ]
+
+
+
+
+player_position : Tuple [ float , float ]
+
+
+
+
+radius : float
+
+
+
+
+time_elapsed : float
+
+
+
+
+get_entity ( prototype ) [source]
+
+Return type:
+Optional [EntityInfo ]
+
+
+
+
+
+
+get_entities ( prototype ) [source]
+
+Return type:
+List [EntityInfo ]
+
+
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. BoundingBox ( ** data ) [source]
+Bases: BaseModel
+
+
+left_top : Position
+
+
+
+
+right_bottom : Position
+
+
+
+
+left_bottom : Position
+
+
+
+
+right_top : Position
+
+
+
+
+property center : Position
+
+
+
+
+width ( ) [source]
+Calculate the width of the bounding box.
+
+Returns:
+The absolute difference between right and left x-coordinates
+
+Return type:
+float
+
+
+
+
+
+
+height ( ) [source]
+Calculate the height of the bounding box.
+
+Returns:
+The absolute difference between bottom and top y-coordinates
+
+Return type:
+float
+
+
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. BuildingBox ( ** data ) [source]
+Bases: BaseModel
+
+
+height : int
+
+
+
+
+width : int
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. ResourcePatch ( ** data ) [source]
+Bases: BaseModel
+
+
+name : str
+
+
+
+
+size : int
+
+
+
+
+bounding_box : BoundingBox
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. Dimensions ( ** data ) [source]
+Bases: BaseModel
+
+
+width : float
+
+
+
+
+height : float
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. TileDimensions ( ** data ) [source]
+Bases: BaseModel
+
+
+tile_width : float
+
+
+
+
+tile_height : float
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. Ingredient ( ** data ) [source]
+Bases: BaseModel
+
+
+name : str
+
+
+
+
+count : Optional [ int ]
+
+
+
+
+type : Optional [ Literal [ 'fluid' , 'item' ]]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. Product ( ** data ) [source]
+Bases: Ingredient
+
+
+probability : Optional [ float ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. Recipe ( ** data ) [source]
+Bases: BaseModel
+
+
+name : Optional [ str ]
+
+
+
+
+ingredients : Optional [ List [ Ingredient ]]
+
+
+
+
+products : Optional [ List [ Product ]]
+
+
+
+
+energy : Optional [ float ]
+
+
+
+
+category : Optional [ str ]
+
+
+
+
+enabled : bool
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. BurnerType ( ** data ) [source]
+Bases: BaseModel
+Type of entity that burns fuel
+
+
+model_config : ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+fuel : Inventory
+
+
+
+
+
+
+class fle.env.entities. EntityCore ( ** data ) [source]
+Bases: BaseModel
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+name : str
+
+
+
+
+direction : Direction
+
+
+
+
+position : Position
+
+
+
+
+
+
+class fle.env.entities. Entity ( ** data ) [source]
+Bases: EntityCore
+Base class for all entities in the game.
+
+
+id : Optional [ int ]
+
+
+
+
+energy : float
+
+
+
+
+type : Optional [ str ]
+
+
+
+
+dimensions : Dimensions
+
+
+
+
+tile_dimensions : TileDimensions
+
+
+
+
+prototype : Any
+
+
+
+
+health : float
+
+
+
+
+warnings : List [ str ]
+
+
+
+
+status : EntityStatus
+
+
+
+
+class property width
+
+
+
+
+class property height
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. StaticEntity ( ** data ) [source]
+Bases: Entity
+A static (non-moving) entity in the game.
+
+
+neighbours : Union [ Dict , List [ EntityCore ], None ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. Rail ( ** data ) [source]
+Bases: Entity
+Railway track for trains.
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. Splitter ( ** data ) [source]
+Bases: Entity
+A belt splitter that divides item flow between outputs.
+
+
+input_positions : List [ Position ]
+
+
+
+
+output_positions : List [ Position ]
+
+
+
+
+inventory : List [ Inventory ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. TransportBelt ( ** data ) [source]
+Bases: Entity
+A conveyor belt for moving items.
+
+
+input_position : Position
+
+
+
+
+output_position : Position
+
+
+
+
+inventory : Dict [ Literal [ 'left' , 'right' ], Inventory ]
+
+
+
+
+is_terminus : bool
+
+
+
+
+is_source : bool
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. Electric ( ** data ) [source]
+Bases: BaseModel
+Base class for entities that interact with the power grid.
+
+
+electrical_id : Optional [ int ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. ElectricalProducer ( ** data ) [source]
+Bases: Electric , Entity
+An entity that generates electrical power.
+
+
+production : Optional [ Any ]
+
+
+
+
+energy_source : Optional [ Any ]
+
+
+
+
+electric_output_flow_limit : Optional [ float ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. EnergySource ( ** data ) [source]
+Bases: BaseModel
+
+
+buffer_capacity : str
+
+
+
+
+input_flow_limit : str
+
+
+
+
+output_flow_limit : str
+
+
+
+
+drain : str
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. Accumulator ( ** data ) [source]
+Bases: StaticEntity , Electric
+Represents an energy storage device
+
+
+energy_source : Optional [ EnergySource ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. Inserter ( ** data ) [source]
+Bases: StaticEntity , Electric
+Represents an inserter that moves items between entities.
+Requires electricity to power
+
+
+pickup_position : Optional [ Position ]
+
+
+
+
+drop_position : Position
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. Filtered ( ** data ) [source]
+Bases: BaseModel
+
+
+filter : Optional [ Any ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. UndergroundBelt ( ** data ) [source]
+Bases: TransportBelt
+An underground section of transport belt.
+
+
+is_input : bool
+
+
+
+
+connected_to : Optional [ int ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. MiningDrill ( ** data ) [source]
+Bases: StaticEntity
+Base class for mining drills that extract resources.
+The direction of the drill is where the drop_position is oriented towards
+
+
+drop_position : Position
+
+
+
+
+resources : List [ Ingredient ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. ElectricMiningDrill ( ** data ) [source]
+Bases: MiningDrill , Electric
+An electrically-powered mining drill.
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. BurnerInserter ( ** data ) [source]
+Bases: Inserter , BurnerType
+An inserter powered by burnable fuel.
+
+
+model_config : ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. BurnerMiningDrill ( ** data ) [source]
+Bases: MiningDrill , BurnerType
+A mining drill powered by burnable fuel.
+
+
+model_config : ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. Ammo ( ** data ) [source]
+Bases: BaseModel
+
+
+name : str
+
+
+
+
+magazine_size : Optional [ int ]
+
+
+
+
+reload_time : Optional [ float ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. GunTurret ( ** data ) [source]
+Bases: StaticEntity
+
+
+turret_ammo : Inventory
+
+
+
+
+kills : Optional [ int ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. AssemblingMachine ( ** data ) [source]
+Bases: StaticEntity , Electric
+A machine that crafts items from ingredients.
+Requires power to operate
+
+
+recipe : Optional [ Recipe ]
+
+
+
+
+assembling_machine_input : Inventory
+
+
+
+
+assembling_machine_output : Inventory
+
+
+
+
+assembling_machine_modules : Inventory
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. FluidHandler ( ** data ) [source]
+Bases: StaticEntity
+Base class for entities that handle fluids
+
+
+connection_points : List [ Position ]
+
+
+
+
+fluid_box : Union [ dict , list , None ]
+
+
+
+
+fluid_systems : Union [ dict , list , None ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. AdvancedAssemblingMachine ( ** data ) [source]
+Bases: FluidHandler , AssemblingMachine
+A second and third tier assembling machine that can handle fluids.
+Requires power to operate
+A recipe first needs to be set and then the input fluid source can be connected with pipes
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. MultiFluidHandler ( ** data ) [source]
+Bases: StaticEntity
+Base class for entities that handle multiple fluid types.
+
+
+input_fluids : List [ str ]
+
+
+
+
+output_fluids : List [ str ]
+
+
+
+
+input_connection_points : List [ IndexedPosition ]
+
+
+
+
+output_connection_points : List [ IndexedPosition ]
+
+
+
+
+fluid_box : Union [ dict , list , None ]
+
+
+
+
+fluid_systems : Union [ dict , list , None ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. FilterInserter ( ** data ) [source]
+Bases: Inserter , Filtered
+A inserter that only moves specific items
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. ChemicalPlant ( ** data ) [source]
+Bases: MultiFluidHandler , AssemblingMachine
+Represents a chemical plant that processes fluid recipes.
+Requires powering and accepts input fluids (from storage tanks etc) and solids (with inserters)
+Outputs either:
+
+solids (battery, plastic) that need to be extracted with inserters
+fluids (sulfuric acid, oil) that need to be extracted with pipes
+
+IMPORTANT: First a recipe needs to be set and then the fluid sources can be connected to the plant
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. OilRefinery ( ** data ) [source]
+Bases: MultiFluidHandler , AssemblingMachine
+An oil refinery for processing crude oil into products.
+Requires powering and accepts input fluids (from pumpjacks, storage tanks etc) and solids
+First a recipe needs to be set and then the fluid sources can be connected to the refinery
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. PumpJack ( ** data ) [source]
+Bases: MiningDrill , FluidHandler , Electric
+A pump jack for extracting crude oil. Requires electricity.
+This needs to be placed on crude oil and oil needs to be extracted with pipes
+Oil can be sent to a storage tank, oil refinery or a chemical plant
+Oil can also be sent to assmbling machine to be made into oil barrels
+Important: The PumpJack needs to be placed on exact crude oil tiles
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. SolarPanel ( ** data ) [source]
+Bases: ElectricalProducer
+A solar panel for generating power from sunlight.
+This entity generated power during the day
+Thus it can be directly connected to a entity to power it
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. Boiler ( ** data ) [source]
+Bases: FluidHandler , BurnerType
+A boiler that heats water into steam.
+
+
+steam_output_point : Optional [ Position ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. HeatExchanger ( ** data ) [source]
+Bases: Boiler
+A nuclear heat exchanger that converts water to steam.
+
+
+model_config : ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. Generator ( ** data ) [source]
+Bases: FluidHandler , StaticEntity
+A steam generator that produces electricity.
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. Pump ( ** data ) [source]
+Bases: FluidHandler , Electric
+An electrically-powered fluid pump.
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. OffshorePump ( ** data ) [source]
+Bases: FluidHandler
+A pump that extracts water from water tiles.
+Can be used in power generation setups and to supply water to chemical plants and oil refineries.
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. ElectricityPole ( ** data ) [source]
+Bases: Entity , Electric
+A power pole for electricity distribution.
+
+
+flow_rate : float
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. Furnace ( ** data ) [source]
+Bases: Entity , BurnerType
+A furnace for smelting items
+
+
+furnace_source : Inventory
+
+
+
+
+furnace_result : Inventory
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. ElectricFurnace ( ** data ) [source]
+Bases: Entity , Electric
+An electrically-powered furnace.
+
+
+furnace_source : Inventory
+
+
+
+
+furnace_result : Inventory
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. Chest ( ** data ) [source]
+Bases: Entity
+A storage chest.
+
+
+inventory : Inventory
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. StorageTank ( ** data ) [source]
+Bases: FluidHandler
+A tank for storing fluids.
+Can be used for inputs and outputs of chemical plants and refineries.
+Also can store water from offshore pumps.
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. RocketSilo ( ** data ) [source]
+Bases: StaticEntity , Electric
+A rocket silo that can build and launch rockets.
+
+
+rocket_parts : int
+
+
+
+
+rocket_inventory : Inventory
+
+
+
+
+rocket_progress : float
+
+
+
+
+launch_count : int
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. Rocket ( ** data ) [source]
+Bases: Entity
+A rocket that can be launched from a silo.
+
+
+payload : Optional [ Inventory ]
+
+
+
+
+launch_progress : float
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. Lab ( ** data ) [source]
+Bases: Entity , Electric
+A research laboratory.
+
+
+lab_input : Inventory
+
+
+
+
+lab_modules : Inventory
+
+
+
+
+research : Optional [ Any ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. Pipe ( ** data ) [source]
+Bases: Entity
+A pipe for fluid transport
+
+
+fluidbox_id : int
+
+
+
+
+flow_rate : float
+
+
+
+
+contents : float
+
+
+
+
+fluid : Optional [ str ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. Reactor ( ** data ) [source]
+Bases: StaticEntity
+A nuclear reactor
+
+
+model_config : ClassVar[ConfigDict] = {'extra': 'allow'}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+model_post_init ( context , / )
+This function is meant to behave like a BaseModel method to initialise private attributes.
+It takes context as an argument since that’s what pydantic-core passes when calling it.
+
+Parameters:
+
+
+Return type:
+None
+
+
+
+
+
+
+
+
+class fle.env.entities. EntityGroup ( ** data ) [source]
+Bases: BaseModel
+
+
+id : int
+
+
+
+
+status : EntityStatus
+
+
+
+
+position : Position
+
+
+
+
+name : str
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. WallGroup ( ** data ) [source]
+Bases: EntityGroup
+A wall
+
+
+name : str
+
+
+
+
+entities : List [ Entity ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. BeltGroup ( ** data ) [source]
+Bases: EntityGroup
+A connected group of transport belts.
+
+
+belts : List [ TransportBelt ]
+
+
+
+
+inputs : List [ Entity ]
+
+
+
+
+outputs : List [ Entity ]
+
+
+
+
+inventory : Inventory
+
+
+
+
+name : str
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. PipeGroup ( ** data ) [source]
+Bases: EntityGroup
+A connected group of pipes.
+
+
+pipes : List [ Pipe ]
+
+
+
+
+name : str
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+class fle.env.entities. ElectricityGroup ( ** data ) [source]
+Bases: EntityGroup
+Represents a connected power network.
+
+
+name : str
+
+
+
+
+poles : List [ ElectricityPole ]
+
+
+
+
+model_config : ClassVar[ConfigDict] = {}
+Configuration for the model, should be a dictionary conforming to [ConfigDict ][pydantic.config.ConfigDict].
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/api/modules/fle.env.game_types.html b/docs/sphinx/build/html/api/modules/fle.env.game_types.html
new file mode 100644
index 000000000..5fae930e0
--- /dev/null
+++ b/docs/sphinx/build/html/api/modules/fle.env.game_types.html
@@ -0,0 +1,1242 @@
+
+
+
+
+
+
+
+
+
fle.env.game_types module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+fle.env.game_types module
+
+
+class fle.env.game_types. ResourceName ( value ) [source]
+Bases: Enum
+An enumeration.
+
+
+Coal = 'coal'
+
+
+
+
+IronOre = 'iron-ore'
+
+
+
+
+CopperOre = 'copper-ore'
+
+
+
+
+Stone = 'stone'
+
+
+
+
+Water = 'water'
+
+
+
+
+CrudeOil = 'crude-oil'
+
+
+
+
+UraniumOre = 'uranium-ore'
+
+
+
+
+
+
+class fle.env.game_types. PrototypeMetaclass ( cls , bases , classdict , ** kwds ) [source]
+Bases: EnumMeta
+
+
+
+
+class fle.env.game_types. RecipeName ( value ) [source]
+Bases: Enum
+Recipe names that can be used in the game for fluids
+
+
+NuclearFuelReprocessing = 'nuclear-fuel-reprocessing'
+
+
+
+
+UraniumProcessing = 'uranium-processing'
+
+
+
+
+SulfuricAcid = 'sulfuric-acid'
+
+
+
+
+BasicOilProcessing = 'basic-oil-processing'
+
+
+
+
+AdvancedOilProcessing = 'advanced-oil-processing'
+
+
+
+
+CoalLiquefaction = 'coal-liquefaction'
+
+
+
+
+HeavyOilCracking = 'heavy-oil-cracking'
+
+
+
+
+LightOilCracking = 'light-oil-cracking'
+
+
+
+
+SolidFuelFromHeavyOil = 'solid-fuel-from-heavy-oil'
+
+
+
+
+SolidFuelFromLightOil = 'solid-fuel-from-light-oil'
+
+
+
+
+SolidFuelFromPetroleumGas = 'solid-fuel-from-petroleum-gas'
+
+
+
+
+FillCrudeOilBarrel = 'fill-crude-oil-barrel'
+
+
+
+
+FillHeavyOilBarrel = 'fill-heavy-oil-barrel'
+
+
+
+
+FillLightOilBarrel = 'fill-light-oil-barrel'
+
+
+
+
+FillLubricantBarrel = 'fill-lubricant-barrel'
+
+
+
+
+FillPetroleumGasBarrel = 'fill-petroleum-gas-barrel'
+
+
+
+
+FillSulfuricAcidBarrel = 'fill-sulfuric-acid-barrel'
+
+
+
+
+FillWaterBarrel = 'fill-water-barrel'
+
+
+
+
+EmptyCrudeOilBarrel = 'empty-crude-oil-barrel'
+
+
+
+
+EmptyHeavyOilBarrel = 'empty-heavy-oil-barrel'
+
+
+
+
+EmptyLightOilBarrel = 'empty-light-oil-barrel'
+
+
+
+
+EmptyLubricantBarrel = 'empty-lubricant-barrel'
+
+
+
+
+EmptyPetroleumGasBarrel = 'empty-petroleum-gas-barrel'
+
+
+
+
+EmptySulfuricAcidBarrel = 'empty-sulfuric-acid-barrel'
+
+
+
+
+EmptyWaterBarrel = 'empty-water-barrel'
+
+
+
+
+
+
+class fle.env.game_types. Prototype ( value ) [source]
+Bases: Enum
+An enumeration.
+
+
+AssemblingMachine1 = ('assembling-machine-1', <class 'fle.env.entities.AssemblingMachine'>)
+
+
+
+
+AssemblingMachine2 = ('assembling-machine-2', <class 'fle.env.entities.AdvancedAssemblingMachine'>)
+
+
+
+
+AssemblingMachine3 = ('assembling-machine-3', <class 'fle.env.entities.AdvancedAssemblingMachine'>)
+
+
+
+
+Centrifuge = ('centrifuge', <class 'fle.env.entities.AssemblingMachine'>)
+
+
+
+
+BurnerInserter = ('burner-inserter', <class 'fle.env.entities.BurnerInserter'>)
+
+
+
+
+FastInserter = ('fast-inserter', <class 'fle.env.entities.Inserter'>)
+
+
+
+
+ExpressInserter = ('express-inserter', <class 'fle.env.entities.Inserter'>)
+
+
+
+
+LongHandedInserter = ('long-handed-inserter', <class 'fle.env.entities.Inserter'>)
+
+
+
+
+StackInserter = ('stack-inserter', <class 'fle.env.entities.Inserter'>)
+
+
+
+
+StackFilterInserter = ('stack-filter-inserter', <class 'fle.env.entities.FilterInserter'>)
+
+
+
+
+FilterInserter = ('filter-inserter', <class 'fle.env.entities.FilterInserter'>)
+
+
+
+
+Inserter = ('inserter', <class 'fle.env.entities.Inserter'>)
+
+
+
+
+BurnerMiningDrill = ('burner-mining-drill', <class 'fle.env.entities.BurnerMiningDrill'>)
+
+
+
+
+ElectricMiningDrill = ('electric-mining-drill', <class 'fle.env.entities.ElectricMiningDrill'>)
+
+
+
+
+StoneFurnace = ('stone-furnace', <class 'fle.env.entities.Furnace'>)
+
+
+
+
+SteelFurnace = ('steel-furnace', <class 'fle.env.entities.Furnace'>)
+
+
+
+
+ElectricFurnace = ('electric-furnace', <class 'fle.env.entities.ElectricFurnace'>)
+
+
+
+
+Splitter = ('splitter', <class 'fle.env.entities.Splitter'>)
+
+
+
+
+FastSplitter = ('fast-splitter', <class 'fle.env.entities.Splitter'>)
+
+
+
+
+ExpressSplitter = ('express-splitter', <class 'fle.env.entities.Splitter'>)
+
+
+
+
+Rail = ('rail', <class 'fle.env.entities.Rail'>)
+
+
+
+
+TransportBelt = ('transport-belt', <class 'fle.env.entities.TransportBelt'>)
+
+
+
+
+FastTransportBelt = ('fast-transport-belt', <class 'fle.env.entities.TransportBelt'>)
+
+
+
+
+ExpressTransportBelt = ('express-transport-belt', <class 'fle.env.entities.TransportBelt'>)
+
+
+
+
+ExpressUndergroundBelt = ('express-underground-belt', <class 'fle.env.entities.UndergroundBelt'>)
+
+
+
+
+FastUndergroundBelt = ('fast-underground-belt', <class 'fle.env.entities.UndergroundBelt'>)
+
+
+
+
+UndergroundBelt = ('underground-belt', <class 'fle.env.entities.UndergroundBelt'>)
+
+
+
+
+OffshorePump = ('offshore-pump', <class 'fle.env.entities.OffshorePump'>)
+
+
+
+
+PumpJack = ('pumpjack', <class 'fle.env.entities.PumpJack'>)
+
+
+
+
+Pump = ('pump', <class 'fle.env.entities.Pump'>)
+
+
+
+
+Boiler = ('boiler', <class 'fle.env.entities.Boiler'>)
+
+
+
+
+OilRefinery = ('oil-refinery', <class 'fle.env.entities.OilRefinery'>)
+
+
+
+
+ChemicalPlant = ('chemical-plant', <class 'fle.env.entities.ChemicalPlant'>)
+
+
+
+
+SteamEngine = ('steam-engine', <class 'fle.env.entities.Generator'>)
+
+
+
+
+SolarPanel = ('solar-panel', <class 'fle.env.entities.SolarPanel'>)
+
+
+
+
+UndergroundPipe = ('pipe-to-ground', <class 'fle.env.entities.Pipe'>)
+
+
+
+
+HeatPipe = ('heat-pipe', <class 'fle.env.entities.Pipe'>)
+
+
+
+
+Pipe = ('pipe', <class 'fle.env.entities.Pipe'>)
+
+
+
+
+SteelChest = ('steel-chest', <class 'fle.env.entities.Chest'>)
+
+
+
+
+IronChest = ('iron-chest', <class 'fle.env.entities.Chest'>)
+
+
+
+
+WoodenChest = ('wooden-chest', <class 'fle.env.entities.Chest'>)
+
+
+
+
+IronGearWheel = ('iron-gear-wheel', <class 'fle.env.entities.Entity'>)
+
+
+
+
+StorageTank = ('storage-tank', <class 'fle.env.entities.StorageTank'>)
+
+
+
+
+SmallElectricPole = ('small-electric-pole', <class 'fle.env.entities.ElectricityPole'>)
+
+
+
+
+MediumElectricPole = ('medium-electric-pole', <class 'fle.env.entities.ElectricityPole'>)
+
+
+
+
+BigElectricPole = ('big-electric-pole', <class 'fle.env.entities.ElectricityPole'>)
+
+
+
+
+Coal = ('coal', None)
+
+
+
+
+Wood = ('wood', None)
+
+
+
+
+Sulfur = ('sulfur', None)
+
+
+
+
+IronOre = ('iron-ore', None)
+
+
+
+
+CopperOre = ('copper-ore', None)
+
+
+
+
+Stone = ('stone', None)
+
+
+
+
+Concrete = ('concrete', None)
+
+
+
+
+UraniumOre = ('uranium-ore', None)
+
+
+
+
+IronPlate = ('iron-plate', None)
+
+
+
+
+IronStick = ('iron-stick', None)
+
+
+
+
+SteelPlate = ('steel-plate', None)
+
+
+
+
+CopperPlate = ('copper-plate', None)
+
+
+
+
+StoneBrick = ('stone-brick', None)
+
+
+
+
+CopperCable = ('copper-cable', None)
+
+
+
+
+PlasticBar = ('plastic-bar', None)
+
+
+
+
+EmptyBarrel = ('empty-barrel', None)
+
+
+
+
+Battery = ('battery', None)
+
+
+
+
+SulfuricAcid = ('sulfuric-acid', None)
+
+
+
+
+Uranium235 = ('uranium-235', None)
+
+
+
+
+Uranium238 = ('uranium-238', None)
+
+
+
+
+Lubricant = ('lubricant', None)
+
+
+
+
+PetroleumGas = ('petroleum-gas', None)
+
+
+
+
+AdvancedOilProcessing = ('advanced-oil-processing', None)
+
+
+
+
+CoalLiquifaction = ('coal-liquifaction', None)
+
+
+
+
+SolidFuel = ('solid-fuel', None)
+
+
+
+
+LightOil = ('light-oil', None)
+
+
+
+
+HeavyOil = ('heavy-oil', None)
+
+
+
+
+ElectronicCircuit = ('electronic-circuit', None)
+
+
+
+
+AdvancedCircuit = ('advanced-circuit', None)
+
+
+
+
+ProcessingUnit = ('processing-unit', None)
+
+
+
+
+EngineUnit = ('engine-unit', None)
+
+
+
+
+ElectricEngineUnit = ('electric-engine-unit', None)
+
+
+
+
+Lab = ('lab', <class 'fle.env.entities.Lab'>)
+
+
+
+
+Accumulator = ('accumulator', <class 'fle.env.entities.Accumulator'>)
+
+
+
+
+GunTurret = ('gun-turret', <class 'fle.env.entities.GunTurret'>)
+
+
+
+
+PiercingRoundsMagazine = ('piercing-rounds-magazine', <class 'fle.env.entities.Ammo'>)
+
+
+
+
+FirearmMagazine = ('firearm-magazine', <class 'fle.env.entities.Ammo'>)
+
+
+
+
+Grenade = ('grenade', None)
+
+
+
+
+Radar = ('radar', <class 'fle.env.entities.Entity'>)
+
+
+
+
+StoneWall = ('stone-wall', <class 'fle.env.entities.Entity'>)
+
+
+
+
+Gate = ('gate', <class 'fle.env.entities.Entity'>)
+
+
+
+
+SmallLamp = ('small-lamp', <class 'fle.env.entities.Entity'>)
+
+
+
+
+NuclearReactor = ('nuclear-reactor', <class 'fle.env.entities.Reactor'>)
+
+
+
+
+UraniumFuelCell = ('uranium-fuel-cell', None)
+
+
+
+
+HeatExchanger = ('heat-exchanger', <class 'fle.env.entities.HeatExchanger'>)
+
+
+
+
+AutomationSciencePack = ('automation-science-pack', None)
+
+
+
+
+MilitarySciencePack = ('military-science-pack', None)
+
+
+
+
+LogisticsSciencePack = ('logistic-science-pack', None)
+
+
+
+
+ProductionSciencePack = ('production-science-pack', None)
+
+
+
+
+UtilitySciencePack = ('utility-science-pack', None)
+
+
+
+
+ChemicalSciencePack = ('chemical-science-pack', None)
+
+
+
+
+ProductivityModule = ('productivity-module', None)
+
+
+
+
+ProductivityModule2 = ('productivity-module-2', None)
+
+
+
+
+ProductivityModule3 = ('productivity-module-3', None)
+
+
+
+
+FlyingRobotFrame = ('flying-robot-frame', None)
+
+
+
+
+RocketSilo = ('rocket-silo', <class 'fle.env.entities.RocketSilo'>)
+
+
+
+
+Rocket = ('rocket', <class 'fle.env.entities.Rocket'>)
+
+
+
+
+Satellite = ('satellite', None)
+
+
+
+
+RocketPart = ('rocket-part', None)
+
+
+
+
+RocketControlUnit = ('rocket-control-unit', None)
+
+
+
+
+LowDensityStructure = ('low-density-structure', None)
+
+
+
+
+RocketFuel = ('rocket-fuel', None)
+
+
+
+
+SpaceSciencePack = ('space-science-pack', None)
+
+
+
+
+BeltGroup = ('belt-group', <class 'fle.env.entities.BeltGroup'>)
+
+
+
+
+PipeGroup = ('pipe-group', <class 'fle.env.entities.PipeGroup'>)
+
+
+
+
+ElectricityGroup = ('electricity-group', <class 'fle.env.entities.ElectricityGroup'>)
+
+
+
+
+__init__ ( prototype_name , entity_class_name ) [source]
+
+
+
+
+property WIDTH
+
+
+
+
+property HEIGHT
+
+
+
+
+
+
+class fle.env.game_types. Technology ( value ) [source]
+Bases: Enum
+An enumeration.
+
+
+Automation = 'automation'
+
+
+
+
+Automation2 = 'automation-2'
+
+
+
+
+Automation3 = 'automation-3'
+
+
+
+
+Logistics = 'logistics'
+
+
+
+
+Logistics2 = 'logistics-2'
+
+
+
+
+Logistics3 = 'logistics-3'
+
+
+
+
+AdvancedElectronics = 'advanced-electronics'
+
+
+
+
+AdvancedElectronics2 = 'advanced-electronics-2'
+
+
+
+
+Electronics = 'electronics'
+
+
+
+
+ElectricEnergy = 'electric-energy-distribution-1'
+
+
+
+
+ElectricEnergy2 = 'electric-energy-distribution-2'
+
+
+
+
+SolarEnergy = 'solar-energy'
+
+
+
+
+ElectricEngineering = 'electric-engine'
+
+
+
+
+BatteryTechnology = 'battery'
+
+
+
+
+NuclearPower = 'nuclear-power'
+
+
+
+
+SteelProcessing = 'steel-processing'
+
+
+
+
+AdvancedMaterialProcessing = 'advanced-material-processing'
+
+
+
+
+AdvancedMaterialProcessing2 = 'advanced-material-processing-2'
+
+
+
+
+MilitaryScience = 'military'
+
+
+
+
+ModularArmor = 'modular-armor'
+
+
+
+
+PowerArmor = 'power-armor'
+
+
+
+
+PowerArmor2 = 'power-armor-mk2'
+
+
+
+
+NightVision = 'night-vision-equipment'
+
+
+
+
+EnergyShield = 'energy-shields'
+
+
+
+
+EnergyShield2 = 'energy-shields-mk2-equipment'
+
+
+
+
+RailwayTransportation = 'railway'
+
+
+
+
+OilProcessing = 'oil-processing'
+
+
+
+
+AdvancedOilProcessing = 'advanced-oil-processing'
+
+
+
+
+SulfurProcessing = 'sulfur-processing'
+
+
+
+
+Plastics = 'plastics'
+
+
+
+
+Lubricant = 'lubricant'
+
+
+
+
+ProductivityModule = 'productivity-module'
+
+
+
+
+ProductivityModule2 = 'productivity-module-2'
+
+
+
+
+ProductivityModule3 = 'productivity-module-3'
+
+
+
+
+Robotics = 'robotics'
+
+
+
+
+LogisticsSciencePack = 'logistic-science-pack'
+
+
+
+
+MilitarySciencePack = 'military-science-pack'
+
+
+
+
+ChemicalSciencePack = 'chemical-science-pack'
+
+
+
+
+ProductionSciencePack = 'production-science-pack'
+
+
+
+
+FastInserter = 'fast-inserter'
+
+
+
+
+StackInserter = 'stack-inserter'
+
+
+
+
+StackInserterCapacity1 = 'stack-inserter-capacity-bonus-1'
+
+
+
+
+StackInserterCapacity2 = 'stack-inserter-capacity-bonus-2'
+
+
+
+
+StorageTanks = 'fluid-handling'
+
+
+
+
+BarrelFilling = 'barrel-filling'
+
+
+
+
+Grenades = 'grenades'
+
+
+
+
+Landfill = 'landfill'
+
+
+
+
+CharacterInventorySlots = 'character-inventory-slots'
+
+
+
+
+ResearchSpeed = 'research-speed'
+
+
+
+
+SpaceScience = 'space-science-pack'
+
+
+
+
+RocketFuel = 'rocket-fuel'
+
+
+
+
+RocketControl = 'rocket-control-unit'
+
+
+
+
+LowDensityStructure = 'low-density-structure'
+
+
+
+
+RocketSiloTechnology = 'rocket-silo'
+
+
+
+
+
+
+class fle.env.game_types. Resource [source]
+Bases: object
+
+
+Coal = ('coal', <class 'fle.env.entities.ResourcePatch'>)
+
+
+
+
+IronOre = ('iron-ore', <class 'fle.env.entities.ResourcePatch'>)
+
+
+
+
+CopperOre = ('copper-ore', <class 'fle.env.entities.ResourcePatch'>)
+
+
+
+
+Stone = ('stone', <class 'fle.env.entities.ResourcePatch'>)
+
+
+
+
+Water = ('water', <class 'fle.env.entities.ResourcePatch'>)
+
+
+
+
+CrudeOil = ('crude-oil', <class 'fle.env.entities.ResourcePatch'>)
+
+
+
+
+UraniumOre = ('uranium-ore', <class 'fle.env.entities.ResourcePatch'>)
+
+
+
+
+Wood = ('wood', <class 'fle.env.entities.ResourcePatch'>)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/api/modules/fle.env.gym_env.html b/docs/sphinx/build/html/api/modules/fle.env.gym_env.html
new file mode 100644
index 000000000..d7c086d67
--- /dev/null
+++ b/docs/sphinx/build/html/api/modules/fle.env.gym_env.html
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
fle.env.gym_env module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/api/modules/fle.env.instance.html b/docs/sphinx/build/html/api/modules/fle.env.instance.html
new file mode 100644
index 000000000..b6804479c
--- /dev/null
+++ b/docs/sphinx/build/html/api/modules/fle.env.instance.html
@@ -0,0 +1,426 @@
+
+
+
+
+
+
+
+
+
fle.env.instance module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+fle.env.instance module
+
+
+class fle.env.instance. GameControl ( rcon_client , render_message_tool , reset_speed = 10 , reset_paused = False ) [source]
+Bases: object
+Handles game speed and pause/unpause functionality
+
+
+__init__ ( rcon_client , render_message_tool , reset_speed = 10 , reset_paused = False ) [source]
+
+
+
+
+set_speed ( speed ) [source]
+Set game speed (only affects speed when unpaused)
+
+
+
+
+get_speed ( ) [source]
+Get current speed setting (regardless of pause state)
+
+Return type:
+float
+
+
+
+
+
+
+pause ( ) [source]
+Pause the game (preserves speed setting)
+
+
+
+
+unpause ( ) [source]
+Unpause the game (restores previous speed)
+
+
+
+
+is_paused ( ) [source]
+Check if game is currently paused
+
+Return type:
+bool
+
+
+
+
+
+
+set_speed_and_unpause ( speed ) [source]
+Set speed and ensure game is unpaused - common use case
+
+
+
+
+pause_at_speed ( speed ) [source]
+Set speed for when unpaused, but pause immediately
+
+
+
+
+get_elapsed_ticks ( ) [source]
+
+
+
+
+reset_to_defaults ( ) [source]
+Reset to the configured default speed and pause state
+
+
+
+
+
+
+class fle.env.instance. DirectionInternal ( value ) [source]
+Bases: Enum
+An enumeration.
+
+
+UP = 0
+
+
+
+
+NORTH = 0
+
+
+
+
+RIGHT = 2
+
+
+
+
+EAST = 2
+
+
+
+
+DOWN = 4
+
+
+
+
+SOUTH = 4
+
+
+
+
+LEFT = 6
+
+
+
+
+WEST = 6
+
+
+
+
+classmethod opposite ( direction ) [source]
+
+
+
+
+classmethod next_clockwise ( direction ) [source]
+
+
+
+
+classmethod next_counterclockwise ( direction ) [source]
+
+
+
+
+classmethod to_factorio_direction ( direction ) [source]
+
+
+
+
+classmethod from_factorio_direction ( direction ) [source]
+
+
+
+
+
+
+class fle.env.instance. FactorioInstance ( address = 'localhost' , fast = True , tcp_port = 27000 , inventory = {} , cache_scripts = True , all_technologies_researched = True , clear_entities = True , peaceful = True , num_agents = 1 , reset_speed = 10 , reset_paused = False , ** kwargs ) [source]
+Bases: object
+
+
+namespace_class
+alias of FactorioNamespace
+
+
+
+
+__init__ ( address = 'localhost' , fast = True , tcp_port = 27000 , inventory = {} , cache_scripts = True , all_technologies_researched = True , clear_entities = True , peaceful = True , num_agents = 1 , reset_speed = 10 , reset_paused = False , ** kwargs ) [source]
+
+
+
+
+property namespace
+
+
+
+
+property first_namespace : FactorioNamespace | None
+
+
+
+
+property is_multiagent
+
+
+
+
+reset ( game_state = None , reset_position = False , all_technologies_researched = True , clear_entities = True ) [source]
+
+
+
+
+set_speed ( speed ) [source]
+Set game speed (only affects speed when unpaused)
+
+
+
+
+get_speed ( ) [source]
+Get current speed setting (regardless of pause state)
+
+Return type:
+float
+
+
+
+
+
+
+get_elapsed_ticks ( ) [source]
+Get the number of ticks elapsed since the game started
+
+
+
+
+pause ( ) [source]
+Pause the game (preserves speed setting)
+
+
+
+
+unpause ( ) [source]
+Unpause the game (restores previous speed)
+
+
+
+
+set_speed_and_unpause ( speed ) [source]
+Set speed and ensure game is unpaused - common use case
+
+
+
+
+get_system_prompt ( agent_idx = 0 ) [source]
+Get the system prompt for the Factorio environment.
+This includes all the available actions, objects, and entities that the agent can interact with.
+We get the system prompt by loading the schema, definitions, and entity definitions from their source files.
+These are converted to their signatures - leaving out the implementations.
+:rtype: str
+:return:
+
+
+
+
+static connect_to_server ( address , tcp_port ) [source]
+
+
+
+
+eval_with_error ( expr , agent_idx = 0 , timeout = 60 ) [source]
+Evaluate an expression with a timeout, and return the result without error handling
+
+
+
+
+eval ( expr , agent_idx = 0 , timeout = 60 ) [source]
+Evaluate several lines of input, returning the result of the last line with a timeout
+
+
+
+
+initialise ( fast = True , all_technologies_researched = True , clear_entities = True ) [source]
+
+
+
+
+get_warnings ( seconds = 10 ) [source]
+Get all alerts that have been raised before the last n seconds
+:type seconds:
+:param seconds: The number of seconds to look back
+:return:
+
+
+
+
+cleanup ( ) [source]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/api/modules/fle.env.namespace.html b/docs/sphinx/build/html/api/modules/fle.env.namespace.html
new file mode 100644
index 000000000..0d76f8255
--- /dev/null
+++ b/docs/sphinx/build/html/api/modules/fle.env.namespace.html
@@ -0,0 +1,273 @@
+
+
+
+
+
+
+
+
+
fle.env.namespace module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+fle.env.namespace module
+
+
+class fle.env.namespace. LoopContext [source]
+Bases: object
+
+
+__init__ ( ) [source]
+
+
+
+
+enter_loop ( loop_node ) [source]
+
+
+
+
+exit_loop ( ) [source]
+
+
+
+
+handle_break ( ) [source]
+
+
+
+
+handle_continue ( ) [source]
+
+
+
+
+
+
+class fle.env.namespace. FactorioNamespace ( instance , agent_index ) [source]
+Bases: object
+
+
+__init__ ( instance , agent_index ) [source]
+
+
+
+
+get_functions ( ) [source]
+Gets all defined functions mapped from their attribute name in the namespace.
+@return:
+
+Return type:
+List [SerializableFunction ]
+
+
+
+
+
+
+load ( namespace_str ) [source]
+
+
+
+
+reset ( ) [source]
+Delete all variables that have accrued in the namespace by the agent, except for preexisting members
+@return:
+
+
+
+
+log ( * arg ) [source]
+
+
+
+
+execute_body ( body , eval_dict , parent_node = None ) [source]
+Execute a sequence of nodes while maintaining line numbers
+
+
+
+
+execute_node ( node , eval_dict , parent_node = None ) [source]
+Helper function to execute a single AST node
+Returns: True for normal execution, False or string for control flow changes
+
+
+
+
+eval_with_timeout ( expr ) [source]
+Executes a Python expression with a timeout and returns the result.
+Supports try-except blocks, type annotations, and nested control flows.
+
+
+
+
+get_messages ( ) [source]
+
+Return type:
+List [Dict ]
+
+
+
+
+
+
+load_messages ( messages ) [source]
+
+
+
+
+
+
+fle.env.namespace. wrap_for_serialization ( value ) [source]
+Wrap values that need special serialization handling
+
+
+
+
+fle.env.namespace. unwrap_after_deserialization ( instance , value ) [source]
+Unwrap serialized values back to their original form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/api/modules/fle.eval.algorithms.html b/docs/sphinx/build/html/api/modules/fle.eval.algorithms.html
new file mode 100644
index 000000000..0a58376d9
--- /dev/null
+++ b/docs/sphinx/build/html/api/modules/fle.eval.algorithms.html
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+
+
fle.eval.algorithms module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/api/modules/fle.eval.tasks.html b/docs/sphinx/build/html/api/modules/fle.eval.tasks.html
new file mode 100644
index 000000000..40ae47f83
--- /dev/null
+++ b/docs/sphinx/build/html/api/modules/fle.eval.tasks.html
@@ -0,0 +1,410 @@
+
+
+
+
+
+
+
+
+
fle.eval.tasks module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+fle.eval.tasks module
+Task definitions and evaluation framework for the Factorio Learning Environment.
+This module contains the task system used for evaluating agent performance in Factorio.
+Tasks define objectives, success conditions, and provide standardized evaluation metrics.
+The task system supports various types of challenges including:
+- Throughput-based tasks (achieve specific production rates)
+- Unbounded optimization tasks (maximize production)
+- Custom task definitions loaded from JSON files
+
+Example usage: from fle.eval.tasks import TaskFactory, ThroughputTask
+# Create task from JSON definition
+task = TaskFactory.create_task(“iron_plate_throughput_16.json”)
+# Or create task directly
+task = ThroughputTask(
+
+trajectory_length=100,
+goal_description=”Build an iron plate factory”,
+task_key=”iron_plate_task”,
+throughput_entity=”iron-plate”,
+quota=50,
+holdout_wait_period=60
+
+)
+
+
+
+
+class fle.eval.tasks. TaskABC ( trajectory_length , starting_inventory , goal_description , task_key , all_technology_reserached = False , agent_instructions = None ) [source]
+Bases: object
+
+
+__init__ ( trajectory_length , starting_inventory , goal_description , task_key , all_technology_reserached = False , agent_instructions = None ) [source]
+
+
+
+
+get_agent_instructions ( agent_idx ) [source]
+
+Return type:
+Optional [str ]
+
+
+
+
+
+
+verify ( score , step , instance , step_statistics ) [source]
+Verify if the task is completed based on the current state.
+
+Parameters:
+
+score (float ) – The current score/reward value
+step (int ) – The current step number
+instance (FactorioInstance ) – The Factorio game instance
+step_statistics (Dict ) – Dictionary containing statistics about the current step
+
+
+Returns:
+Response object indicating task completion status and metadata
+
+Return type:
+TaskResponse
+
+
+
+
+
+
+setup_instance ( instance ) [source]
+Code to provision the task environment
+
+
+
+
+enhance_response_with_task_output ( response , task_response ) [source]
+Add task specific information to the environment response
+
+Return type:
+str
+
+
+
+
+
+
+setup ( instance ) [source]
+setup function
+
+
+
+
+
+
+class fle.eval.tasks. DefaultTask ( trajectory_length , goal_description , task_key , agent_instructions = None ) [source]
+Bases: TaskABC
+
+
+__init__ ( trajectory_length , goal_description , task_key , agent_instructions = None ) [source]
+
+
+
+
+verify ( score , instance , step_statistics ) [source]
+Verify if the task is completed based on the current state.
+
+Parameters:
+
+score (float ) – The current score/reward value
+step (int ) – The current step number
+instance (FactorioInstance ) – The Factorio game instance
+step_statistics (Dict ) – Dictionary containing statistics about the current step
+
+
+Returns:
+Response object indicating task completion status and metadata
+
+Return type:
+TaskResponse
+
+
+
+
+
+
+setup_instance ( instance ) [source]
+Code to provision the task environment
+
+
+
+
+
+
+class fle.eval.tasks. ThroughputTask ( trajectory_length , goal_description , task_key , throughput_entity , quota , holdout_wait_period , pre_holdout_wait_period = 0 , agent_instructions = None ) [source]
+Bases: TaskABC
+
+
+__init__ ( trajectory_length , goal_description , task_key , throughput_entity , quota , holdout_wait_period , pre_holdout_wait_period = 0 , agent_instructions = None ) [source]
+
+
+
+
+verify ( score , instance , step_statistics ) [source]
+Verify if the task is completed based on the current state.
+
+Parameters:
+
+score (float ) – The current score/reward value
+step (int ) – The current step number
+instance (FactorioInstance ) – The Factorio game instance
+step_statistics (Dict ) – Dictionary containing statistics about the current step
+
+
+Returns:
+Response object indicating task completion status and metadata
+
+Return type:
+TaskResponse
+
+
+
+
+
+
+setup_instance ( instance ) [source]
+Code to provision the task environment
+
+
+
+
+enhance_response_with_task_output ( response , task_response ) [source]
+Add task specific information to the environment response
+
+Return type:
+str
+
+
+
+
+
+
+
+
+class fle.eval.tasks. UnboundedThroughputTask ( trajectory_length , goal_description , task_key , throughput_entity , holdout_wait_period , pre_holdout_wait_period = 0 , show_number_of_steps_left_in_prompt = False , use_populated_inventory = True , unlock_all_research = True , agent_instructions = None ) [source]
+Bases: TaskABC
+
+
+__init__ ( trajectory_length , goal_description , task_key , throughput_entity , holdout_wait_period , pre_holdout_wait_period = 0 , show_number_of_steps_left_in_prompt = False , use_populated_inventory = True , unlock_all_research = True , agent_instructions = None ) [source]
+
+
+
+
+verify ( score , instance , step_statistics ) [source]
+Verify if the task is completed based on the current state.
+
+Parameters:
+
+score (float ) – The current score/reward value
+step (int ) – The current step number
+instance (FactorioInstance ) – The Factorio game instance
+step_statistics (Dict ) – Dictionary containing statistics about the current step
+
+
+Returns:
+Response object indicating task completion status and metadata
+
+Return type:
+TaskResponse
+
+
+
+
+
+
+setup_instance ( instance ) [source]
+Code to provision the task environment
+
+
+
+
+enhance_response_with_task_output ( response , task_response ) [source]
+Add task specific information to the environment response
+
+Return type:
+str
+
+
+
+
+
+
+
+
+class fle.eval.tasks. TaskFactory [source]
+Bases: object
+
+
+__init__ ( ) [source]
+
+
+
+
+static create_task ( task_path ) [source]
+Create a task from a Python-based definition.
+
+Parameters:
+task_path – Task key (e.g., “iron_plate_throughput”)
+
+Return type:
+TaskABC
+
+Returns:
+TaskABC instance
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/api/observation.html b/docs/sphinx/build/html/api/observation.html
new file mode 100644
index 000000000..22e44a9a4
--- /dev/null
+++ b/docs/sphinx/build/html/api/observation.html
@@ -0,0 +1,352 @@
+
+
+
+
+
+
+
+
+
Observation Space — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+ Observation Space
+
+
+
+
+
+
+
+
+
+Observation Space
+The observation space provides rich information about the current game state, allowing agents to make informed decisions.
+
+Observation Structure
+The observation space includes the following components:
+
+raw_text Output from the last action (stdout/stderr)
+
+entities List of entities on the map with their current state
+
+inventory Current inventory state of the player
+
+research Research progress and available technologies
+
+game_info Game state information (tick, time, speed)
+
+score Current score and performance metrics
+
+flows Production statistics and resource flows
+
+task_verification Task completion status and progress
+
+messages Inter-agent communication messages
+
+serialized_functions Available functions and their signatures
+
+task_info Information about the current task
+
+map_image Base64 encoded PNG image of the current map
+
+
+
+
+
+Position and Direction
+
+
+Inventory Management
+The inventory system provides:
+
+Item Storage : Store and retrieve items
+Count Methods : Query item quantities
+Type Validation : Ensure item compatibility
+Transfer Operations : Move items between inventories
+
+
+
+Research System
+Research provides:
+
+Technology Tree : Available technologies
+Prerequisites : Required research
+Progress Tracking : Current research status
+Unlock Management : New technologies and recipes
+
+
+
+
+Task Verification
+Task verification provides:
+
+Completion Status : Whether the task is complete
+Progress Metrics : Current progress toward goals
+Objective Tracking : Individual objective status
+Performance Data : Efficiency and throughput metrics
+
+
+
+Example Observation
+{
+ 'raw_text' : 'Hello Factorio!' ,
+ 'entities' : [
+ Entity ( name = 'burner-mining-drill' , position = Position ( x =- 28.0 , y =- 61.0 ), ... ),
+ Entity ( name = 'iron-chest' , position = Position ( x =- 27.5 , y =- 59.5 ), ... )
+ ],
+ 'inventory' : Inventory ({ 'iron-ore' : 75 , 'coal' : 4 }),
+ 'research' : Research ( technologies = [ 'automation' ], progress = 0.5 ),
+ 'game_info' : GameInfo ( tick = 1000 , time = 16.67 , speed = 1.0 ),
+ 'score' : 150 ,
+ 'flows' : { 'iron-ore' : 2.5 , 'iron-plate' : 1.2 },
+ 'task_verification' : TaskVerification ( complete = False , progress = 0.3 ),
+ 'messages' : [],
+ 'serialized_functions' : [ 'place_entity' , 'get_entities' , ... ],
+ 'task_info' : { 'name' : 'iron_ore_throughput' , 'target' : 16 },
+ 'map_image' : 'iVBORw0KGgoAAAANSUhEUgAA...'
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/api/tools.html b/docs/sphinx/build/html/api/tools.html
new file mode 100644
index 000000000..f8ff4e22c
--- /dev/null
+++ b/docs/sphinx/build/html/api/tools.html
@@ -0,0 +1,416 @@
+
+
+
+
+
+
+
+
+
Tools API — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/customization/agents.html b/docs/sphinx/build/html/customization/agents.html
new file mode 100644
index 000000000..ea81110a0
--- /dev/null
+++ b/docs/sphinx/build/html/customization/agents.html
@@ -0,0 +1,488 @@
+
+
+
+
+
+
+
+
+
Implementing Custom Agents — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+ Implementing Custom Agents
+
+
+
+
+
+
+
+
+
+Implementing Custom Agents
+FLE provides a flexible framework for implementing custom agents. Agents interact with the environment through code synthesis and can be designed for various evaluation scenarios.
+
+Agent Architecture
+Agents in FLE follow a specific architecture:
+
+Base Agent Class Abstract base class defining the agent interface
+
+Agent Implementation Concrete implementation of agent behavior
+
+Agent Registration Registration with the evaluation system
+
+
+
+
+Base Agent Class
+All agents inherit from the base agent class:
+
+Key Methods
+
+act(observation) Generate an action based on the current observation
+
+reset() Reset the agent state for a new episode
+
+close() Clean up agent resources
+
+
+
+
+
+Agent Implementation
+Create a custom agent by inheriting from the base class:
+from fle.agents.agent_abc import Agent
+from fle.env.gym_env.action import Action
+from typing import Dict , Any
+
+class MyCustomAgent ( Agent ):
+ def __init__ ( self , config : Dict [ str , Any ]):
+ super () . __init__ ( config )
+ self . name = "MyCustomAgent"
+ self . episode_count = 0
+ self . total_reward = 0.0
+
+ def act ( self , observation : Dict [ str , Any ]) -> Action :
+ """
+ Generate an action based on the current observation.
+
+ Args:
+ observation: Current game state observation
+
+ Returns:
+ Action to execute
+ """
+ # Analyze the observation
+ entities = observation . get ( 'entities' , [])
+ inventory = observation . get ( 'inventory' , {})
+ game_info = observation . get ( 'game_info' , {})
+
+ # Generate action code
+ code = self . _generate_action_code ( entities , inventory , game_info )
+
+ return Action (
+ agent_idx = 0 ,
+ code = code ,
+ game_state = None
+ )
+
+ def reset ( self ):
+ """Reset agent state for new episode"""
+ self . episode_count += 1
+ self . total_reward = 0.0
+ super () . reset ()
+
+ def close ( self ):
+ """Clean up agent resources"""
+ super () . close ()
+
+ def _generate_action_code ( self , entities , inventory , game_info ):
+ """Generate Python code for the action"""
+ # Implement your action generation logic
+ return 'print("Hello from MyCustomAgent!")'
+
+
+
+
+Agent Types
+
+Basic Agents Simple agents with basic decision-making
+
+Visual Agents Agents that process visual information
+
+Multi-Agent Systems Agents that coordinate with other agents
+
+Learning Agents Agents that improve over time
+
+Specialized Agents Agents designed for specific tasks
+
+
+
+
+Example Agent: Resource Collector
+Here’s a complete example of a resource collection agent:
+from fle.agents.agent_abc import Agent
+from fle.env.gym_env.action import Action
+from fle.env.game_types import Position , Direction
+from typing import Dict , Any , List
+
+class ResourceCollectorAgent ( Agent ):
+ def __init__ ( self , config : Dict [ str , Any ]):
+ super () . __init__ ( config )
+ self . name = "ResourceCollectorAgent"
+ self . target_resources = config . get ( 'target_resources' , [ 'iron-ore' , 'copper-ore' ])
+ self . collected_resources = {}
+ self . mining_setups = []
+
+ def act ( self , observation : Dict [ str , Any ]) -> Action :
+ """Generate action to collect resources"""
+ entities = observation . get ( 'entities' , [])
+ inventory = observation . get ( 'inventory' , {})
+
+ # Check if we need to set up mining
+ if not self . mining_setups :
+ code = self . _setup_mining ( entities )
+ else :
+ code = self . _monitor_mining ( entities , inventory )
+
+ return Action (
+ agent_idx = 0 ,
+ code = code ,
+ game_state = None
+ )
+
+ def _setup_mining ( self , entities : List ) -> str :
+ """Set up mining operations for target resources"""
+ code_lines = []
+
+ for resource in self . target_resources :
+ code_lines . append ( f '''
+
+
+# Set up mining for {resource}
+resource_pos = nearest(Resource.{resource.replace(‘-’, ‘_’).upper()})
+if resource_pos:
+
+
+drill = place_entity( entity=Prototype.MiningDrill,
+position=resource_pos,
+direction=Direction.NORTH
+
+
+
)
+chest = place_entity_next_to(
+
+entity=Prototype.IronChest,
+reference_position=drill.drop_position,
+direction=Direction.SOUTH
+
+
)
+print(f”Set up mining for {{resource}} at {{resource_pos}}”)
+
+‘’’)
+
+
+return ‘n’.join(code_lines)
+
+
+def _monitor_mining(self, entities: List, inventory: Dict) -> str: “””Monitor and manage existing mining operations”””
+return ‘’’
+
+
+
+# Monitor mining operations
+entities = get_entities()
+for entity in entities:
+
+
+if hasattr(entity, ‘status’) and entity.status == EntityStatus.WORKING: print(f”Entity {entity.name} is working”)
+
+elif hasattr(entity, ‘status’) and entity.status == EntityStatus.NO_POWER: print(f”Entity {entity.name} needs power”)
+
+
+
+# Check inventory
+inventory = inspect_inventory()
+for item, count in inventory.items():
+
+
+if count > 0: print(f”Have {count} {item}”)
+
+
+
+‘’’
+
+
+Agent Configuration
+Agents can be configured with various parameters:
+
+Behavior Parameters
+Decision-making algorithms
+Action generation strategies
+State management approaches
+
+
+Performance Parameters
+
+Evaluation Parameters
+Success criteria
+Performance metrics
+Evaluation scenarios
+
+
+
+
+
+Example Configuration
+{
+ "agent_type" : "ResourceCollectorAgent" ,
+ "config" : {
+ "target_resources" : [ "iron-ore" , "copper-ore" , "coal" ],
+ "max_mining_setups" : 5 ,
+ "mining_radius" : 100 ,
+ "inventory_threshold" : 1000
+ },
+ "evaluation" : {
+ "episodes" : 10 ,
+ "max_steps" : 1000 ,
+ "success_threshold" : 0.8
+ }
+}
+
+
+
+
+Agent Testing
+Create test cases for your custom agents:
+import pytest
+from fle.agents.my_custom_agent import MyCustomAgent
+from fle.env.gym_env.action import Action
+
+def test_agent_creation ():
+ config = { 'param1' : 'value1' }
+ agent = MyCustomAgent ( config )
+ assert agent . name == "MyCustomAgent"
+
+def test_agent_action ():
+ config = {}
+ agent = MyCustomAgent ( config )
+
+ observation = {
+ 'entities' : [],
+ 'inventory' : {},
+ 'game_info' : {}
+ }
+
+ action = agent . act ( observation )
+ assert isinstance ( action , Action )
+ assert action . agent_idx == 0
+
+def test_agent_reset ():
+ config = {}
+ agent = MyCustomAgent ( config )
+ agent . reset ()
+ assert agent . episode_count == 1
+
+
+
+
+Advanced Agent Features
+
+State Management
+Persistent state across episodes
+State serialization and loading
+State sharing between agents
+
+
+Learning Capabilities
+Experience replay
+Policy updates
+Performance tracking
+
+
+Multi-Agent Coordination
+Communication protocols
+Task distribution
+Conflict resolution
+
+
+Adaptive Behavior
+
+
+
+
+Agent Registration
+Agents are registered with the evaluation system:
+
+Agent Discovery : The system scans for agent implementations
+Configuration Loading : Agent configurations are loaded
+Initialization : Agents are initialized with their configurations
+Registration : Agents are registered with the evaluation system
+
+
+
+Example Registration
+from fle.agents.registry import register_agent
+from fle.agents.my_custom_agent import MyCustomAgent
+
+# Register the agent
+register_agent ( 'my_custom_agent' , MyCustomAgent )
+
+# Use in evaluation
+config = {
+ 'agent_type' : 'my_custom_agent' ,
+ 'config' : { 'param1' : 'value1' }
+}
+
+
+
+
+Best Practices
+
+Clear Interface : Design simple, intuitive interfaces
+Error Handling : Handle errors gracefully
+State Management : Manage agent state properly
+Performance : Optimize for efficiency
+Testing : Test all scenarios and edge cases
+Documentation : Document agent behavior and configuration
+Modularity : Design for reusability and extensibility
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/customization/database.html b/docs/sphinx/build/html/customization/database.html
new file mode 100644
index 000000000..b6eeb362d
--- /dev/null
+++ b/docs/sphinx/build/html/customization/database.html
@@ -0,0 +1,481 @@
+
+
+
+
+
+
+
+
+
Database Configuration — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+ Database Configuration
+
+
+
+
+
+
+
+
+
+Database Configuration
+FLE supports checkpointing at every agent step using a SQL database. The db_client implements the interface for saving and loading agent outputs, environment feedbacks, game states and histories of the current trajectory.
+
+Database Types
+FLE supports multiple database backends:
+
+SQLite (Default) Lightweight, file-based database
+
+PostgreSQL Full-featured, server-based database
+
+Custom Databases Extensible database interface
+
+
+
+
+SQLite Configuration
+SQLite is the default database and requires minimal configuration:
+# Set database type
+FLE_DB_TYPE = "sqlite"
+
+# Set database file path (default: .fle/data.db)
+SQLITE_DB_FILE = ".fle/data.db"
+
+
+SQLite is ideal for:
+- Development and testing
+- Single-user scenarios
+- Small to medium datasets
+- Quick setup and deployment
+
+
+PostgreSQL Configuration
+For production use and large-scale experiments, PostgreSQL is recommended:
+
+Docker Setup docker run --name fle-postgres \
+ -e POSTGRES_PASSWORD = fle123 \
+ -e POSTGRES_USER = fle_user \
+ -e POSTGRES_DB = fle_database \
+ -p 5432 :5432 \
+ -d postgres:15
+
+
+
+Environment Variables # Database Configuration
+FLE_DB_TYPE = "postgres"
+
+# PostgreSQL Configuration
+SKILLS_DB_HOST = localhost
+SKILLS_DB_PORT = 5432
+SKILLS_DB_NAME = fle_database
+SKILLS_DB_USER = fle_user
+SKILLS_DB_PASSWORD = fle123
+
+
+
+
+PostgreSQL is ideal for:
+- Production deployments
+- Multi-user scenarios
+- Large datasets
+- High-performance requirements
+
+
+Database Schema
+The database schema includes several key tables:
+
+Trajectories Store complete agent trajectories
+
+Steps Individual agent steps within trajectories
+
+Game States Complete game state snapshots
+
+Agent Outputs Agent-generated code and actions
+
+Environment Feedbacks Environment responses and observations
+
+Metadata Additional information about trajectories
+
+
+
+
+Database Client
+The database client provides a unified interface:
+
+Key Methods
+
+save_trajectory(trajectory) Save a complete trajectory
+
+load_trajectory(trajectory_id) Load a trajectory by ID
+
+save_step(step) Save an individual step
+
+load_steps(trajectory_id) Load all steps for a trajectory
+
+save_game_state(state) Save a game state snapshot
+
+load_game_state(state_id) Load a game state by ID
+
+
+
+
+
+Example Usage
+
+Saving a Trajectory from fle.commons.db_client import DatabaseClient
+
+# Initialize database client
+db = DatabaseClient ()
+
+# Save trajectory
+trajectory = {
+ 'id' : 'trajectory_001' ,
+ 'agent_type' : 'MyAgent' ,
+ 'task' : 'iron_ore_throughput' ,
+ 'start_time' : '2024-01-01T00:00:00Z' ,
+ 'end_time' : '2024-01-01T01:00:00Z' ,
+ 'total_reward' : 150.0 ,
+ 'success' : True
+}
+
+db . save_trajectory ( trajectory )
+
+
+
+Loading a Trajectory # Load trajectory
+trajectory = db . load_trajectory ( 'trajectory_001' )
+print ( f "Trajectory: { trajectory [ 'id' ] } " )
+print ( f "Agent: { trajectory [ 'agent_type' ] } " )
+print ( f "Reward: { trajectory [ 'total_reward' ] } " )
+
+
+
+Saving Steps # Save individual step
+step = {
+ 'trajectory_id' : 'trajectory_001' ,
+ 'step_number' : 1 ,
+ 'action' : 'print("Hello Factorio!")' ,
+ 'observation' : { 'entities' : [], 'inventory' : {}},
+ 'reward' : 10.0 ,
+ 'timestamp' : '2024-01-01T00:00:00Z'
+}
+
+db . save_step ( step )
+
+
+
+Loading Steps # Load all steps for a trajectory
+steps = db . load_steps ( 'trajectory_001' )
+for step in steps :
+ print ( f "Step { step [ 'step_number' ] } : { step [ 'action' ] } " )
+
+
+
+
+
+
+Database Migration
+FLE includes database migration support:
+
+Automatic Migration The system automatically migrates the database schema on startup
+
+Manual Migration Run migrations manually when needed
+
+Version Control Track database schema versions
+
+
+
+
+Example Migration
+from fle.commons.db_client import DatabaseClient
+
+# Initialize database client
+db = DatabaseClient ()
+
+# Run migrations
+db . migrate ()
+
+# Check migration status
+status = db . get_migration_status ()
+print ( f "Current version: { status [ 'current_version' ] } " )
+print ( f "Latest version: { status [ 'latest_version' ] } " )
+
+
+
+
+
+Example Optimization
+from fle.commons.db_client import DatabaseClient
+
+# Initialize with connection pooling
+db = DatabaseClient (
+ max_connections = 10 ,
+ connection_timeout = 30
+)
+
+# Batch save multiple steps
+steps = [
+ { 'trajectory_id' : 't1' , 'step_number' : 1 , 'action' : 'action1' },
+ { 'trajectory_id' : 't1' , 'step_number' : 2 , 'action' : 'action2' },
+ { 'trajectory_id' : 't1' , 'step_number' : 3 , 'action' : 'action3' }
+]
+
+db . batch_save_steps ( steps )
+
+
+
+
+Backup and Recovery
+
+Automated Backups Schedule regular database backups
+
+Point-in-Time Recovery Restore to specific timestamps
+
+Data Export Export data for analysis
+
+Data Import Import data from other sources
+
+
+
+
+Example Backup
+from fle.commons.db_client import DatabaseClient
+
+# Initialize database client
+db = DatabaseClient ()
+
+# Create backup
+backup_id = db . create_backup ()
+print ( f "Backup created: { backup_id } " )
+
+# List backups
+backups = db . list_backups ()
+for backup in backups :
+ print ( f "Backup { backup [ 'id' ] } : { backup [ 'timestamp' ] } " )
+
+# Restore from backup
+db . restore_backup ( backup_id )
+
+
+
+
+Monitoring and Maintenance
+
+Performance Monitoring Monitor database performance
+
+Health Checks Verify database health
+
+Cleanup Operations Remove old data
+
+Optimization Optimize database performance
+
+
+
+
+Example Monitoring
+from fle.commons.db_client import DatabaseClient
+
+# Initialize database client
+db = DatabaseClient ()
+
+# Get database statistics
+stats = db . get_statistics ()
+print ( f "Total trajectories: { stats [ 'trajectories' ] } " )
+print ( f "Total steps: { stats [ 'steps' ] } " )
+print ( f "Database size: { stats [ 'size' ] } " )
+
+# Get performance metrics
+metrics = db . get_performance_metrics ()
+print ( f "Average query time: { metrics [ 'avg_query_time' ] } " )
+print ( f "Connection count: { metrics [ 'connection_count' ] } " )
+
+
+
+
+Troubleshooting
+
+Connection Issues
+Verify database server is running
+Check connection parameters
+Verify network connectivity
+
+
+Performance Issues
+
+Data Issues
+Verify data integrity
+Check for corruption
+Run data validation
+
+
+Migration Issues
+
+
+
+
+Best Practices
+
+Regular Backups : Schedule automated backups
+Performance Monitoring : Monitor database performance
+Connection Management : Use connection pooling
+Data Validation : Validate data integrity
+Migration Testing : Test migrations before deployment
+Security : Secure database access
+Documentation : Document database configuration
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/customization/tasks.html b/docs/sphinx/build/html/customization/tasks.html
new file mode 100644
index 000000000..277688e9a
--- /dev/null
+++ b/docs/sphinx/build/html/customization/tasks.html
@@ -0,0 +1,409 @@
+
+
+
+
+
+
+
+
+
Creating Custom Tasks — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+ Creating Custom Tasks
+
+
+
+
+
+
+
+
+
+Creating Custom Tasks
+FLE allows you to create custom tasks for evaluating agent capabilities. Tasks define the objectives, constraints, and success criteria for agent evaluation.
+
+Task Structure
+Tasks are defined in fle/eval/tasks/task_definitions/ and follow a specific structure:
+
+Task Definition File JSON configuration file defining task parameters
+
+Task Implementation Python class implementing the task logic
+
+Task Registration Automatic registration with the gym environment registry
+
+
+
+
+Task Definition
+Create a new task definition file in fle/eval/tasks/task_definitions/ :
+{
+ "name" : "my_custom_task" ,
+ "description" : "A custom task for evaluating agent capabilities" ,
+ "type" : "throughput" ,
+ "target" : 16 ,
+ "time_limit" : 3600 ,
+ "resources" : {
+ "iron_ore" : 10000 ,
+ "copper_ore" : 5000 ,
+ "coal" : 2000
+ },
+ "technologies" : [ "automation" ],
+ "constraints" : {
+ "max_entities" : 100 ,
+ "max_power" : 1000
+ }
+}
+
+
+
+
+Task Types
+
+Throughput Tasks Tasks focused on producing a specific item at a target rate
+
+Research Tasks Tasks focused on technology research and advancement
+
+Construction Tasks Tasks focused on building specific structures
+
+Exploration Tasks Tasks focused on map exploration and discovery
+
+Multi-Objective Tasks Tasks with multiple competing objectives
+
+
+
+
+Task Implementation
+Create a Python class implementing your task:
+from fle.eval.tasks.base import BaseTask
+
+class MyCustomTask ( BaseTask ):
+ def __init__ ( self , config ):
+ super () . __init__ ( config )
+ self . target = config . get ( 'target' , 16 )
+ self . time_limit = config . get ( 'time_limit' , 3600 )
+
+ def evaluate ( self , state ):
+ """Evaluate the current state against task objectives"""
+ # Implement your evaluation logic
+ pass
+
+ def is_complete ( self , state ):
+ """Check if the task is complete"""
+ # Implement completion criteria
+ pass
+
+ def get_reward ( self , state ):
+ """Calculate reward for current state"""
+ # Implement reward calculation
+ pass
+
+
+
+
+Task Configuration
+Tasks can be configured with various parameters:
+
+Resource Constraints
+
+Technology Requirements
+
+Time Constraints
+Time limits
+Time-based objectives
+Time-based rewards
+
+
+Spatial Constraints
+Map size limits
+Entity placement rules
+Distance requirements
+
+
+Performance Constraints
+Power consumption limits
+Entity count limits
+Efficiency requirements
+
+
+
+
+
+Task Registration
+Tasks are automatically registered with the gym environment registry:
+
+File Discovery : The registry scans fle/eval/tasks/task_definitions/
+JSON Parsing : Task definitions are parsed from JSON files
+Environment Creation : Gym environments are created for each task
+Registration : Environments are registered with gym
+
+
+
+Example Task
+Here’s a complete example of a custom task:
+Task Definition (my_custom_task.json ):
+{
+ "name" : "iron_plate_throughput" ,
+ "description" : "Produce iron plates at 16 items per 60 seconds" ,
+ "type" : "throughput" ,
+ "target" : 16 ,
+ "time_limit" : 3600 ,
+ "resources" : {
+ "iron_ore" : 10000 ,
+ "coal" : 2000
+ },
+ "technologies" : [ "automation" ],
+ "constraints" : {
+ "max_entities" : 50 ,
+ "max_power" : 500
+ }
+}
+
+
+Task Implementation (my_custom_task.py ):
+from fle.eval.tasks.base import BaseTask
+from fle.env.game_types import Entity , Inventory
+
+class IronPlateThroughputTask ( BaseTask ):
+ def __init__ ( self , config ):
+ super () . __init__ ( config )
+ self . target = config . get ( 'target' , 16 )
+ self . time_limit = config . get ( 'time_limit' , 3600 )
+ self . start_time = None
+
+ def reset ( self ):
+ """Reset the task state"""
+ self . start_time = None
+ return super () . reset ()
+
+ def evaluate ( self , state ):
+ """Evaluate current throughput"""
+ if self . start_time is None :
+ self . start_time = state . get ( 'game_info' , {}) . get ( 'tick' , 0 )
+
+ current_time = state . get ( 'game_info' , {}) . get ( 'tick' , 0 )
+ elapsed_time = ( current_time - self . start_time ) / 60.0 # Convert to seconds
+
+ if elapsed_time < 60 :
+ return 0.0
+
+ # Calculate throughput
+ inventory = state . get ( 'inventory' , Inventory ({}))
+ iron_plates = inventory . get ( 'iron-plate' , 0 )
+ throughput = iron_plates / elapsed_time
+
+ return throughput
+
+ def is_complete ( self , state ):
+ """Check if target throughput is achieved"""
+ throughput = self . evaluate ( state )
+ return throughput >= self . target
+
+ def get_reward ( self , state ):
+ """Calculate reward based on throughput"""
+ throughput = self . evaluate ( state )
+ if throughput >= self . target :
+ return 1.0
+ else :
+ return throughput / self . target
+
+
+
+
+Testing Tasks
+Create test cases for your custom tasks:
+import pytest
+from fle.eval.tasks.my_custom_task import MyCustomTask
+
+def test_task_creation ():
+ config = {
+ 'target' : 16 ,
+ 'time_limit' : 3600
+ }
+ task = MyCustomTask ( config )
+ assert task . target == 16
+ assert task . time_limit == 3600
+
+def test_task_evaluation ():
+ config = { 'target' : 16 }
+ task = MyCustomTask ( config )
+
+ # Mock state
+ state = {
+ 'inventory' : Inventory ({ 'iron-plate' : 100 }),
+ 'game_info' : { 'tick' : 3600 }
+ }
+
+ throughput = task . evaluate ( state )
+ assert throughput > 0
+
+def test_task_completion ():
+ config = { 'target' : 16 }
+ task = MyCustomTask ( config )
+
+ # Mock state with high throughput
+ state = {
+ 'inventory' : Inventory ({ 'iron-plate' : 1000 }),
+ 'game_info' : { 'tick' : 3600 }
+ }
+
+ assert task . is_complete ( state )
+
+
+
+
+Advanced Features
+
+Multi-Agent Tasks Tasks that require coordination between multiple agents
+
+Dynamic Tasks Tasks that change objectives during execution
+
+Hierarchical Tasks Tasks with sub-objectives and dependencies
+
+Adaptive Tasks Tasks that adjust difficulty based on agent performance
+
+
+
+
+Best Practices
+
+Clear Objectives : Define clear, measurable objectives
+Appropriate Difficulty : Balance challenge with achievability
+Robust Evaluation : Handle edge cases and error conditions
+Comprehensive Testing : Test all task scenarios
+Documentation : Document task requirements and constraints
+Performance : Optimize evaluation for large-scale experiments
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/customization/tools.html b/docs/sphinx/build/html/customization/tools.html
new file mode 100644
index 000000000..eb25756e2
--- /dev/null
+++ b/docs/sphinx/build/html/customization/tools.html
@@ -0,0 +1,455 @@
+
+
+
+
+
+
+
+
+
Creating Custom Tools — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/examples/basic_agent.html b/docs/sphinx/build/html/examples/basic_agent.html
new file mode 100644
index 000000000..e9216a612
--- /dev/null
+++ b/docs/sphinx/build/html/examples/basic_agent.html
@@ -0,0 +1,492 @@
+
+
+
+
+
+
+
+
+
Basic Agent Example — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+ Basic Agent Example
+
+
+
+
+
+
+
+
+
+Basic Agent Example
+This example demonstrates how to create a basic agent that interacts with the Factorio Learning Environment.
+
+Agent Overview
+The basic agent performs simple resource collection and automation tasks:
+
+Resource Discovery : Find and identify available resources
+Mining Setup : Place mining drills on resource patches
+Storage Management : Create storage for collected resources
+Automation : Set up basic automation chains
+
+
+
+Agent Implementation
+from fle.agents.agent_abc import Agent
+from fle.env.gym_env.action import Action
+from fle.env.game_types import Position , Direction
+from typing import Dict , Any , List
+
+class BasicAgent ( Agent ):
+ def __init__ ( self , config : Dict [ str , Any ]):
+ super () . __init__ ( config )
+ self . name = "BasicAgent"
+ self . target_resources = [ 'iron-ore' , 'copper-ore' , 'coal' ]
+ self . mining_setups = []
+ self . step_count = 0
+
+ def act ( self , observation : Dict [ str , Any ]) -> Action :
+ """Generate action based on current observation"""
+ self . step_count += 1
+
+ # Get current state
+ entities = observation . get ( 'entities' , [])
+ inventory = observation . get ( 'inventory' , {})
+ game_info = observation . get ( 'game_info' , {})
+
+ # Generate action code
+ if self . step_count == 1 :
+ code = self . _initial_setup ()
+ elif self . step_count <= 10 :
+ code = self . _setup_mining ()
+ else :
+ code = self . _monitor_and_optimize ( entities , inventory )
+
+ return Action (
+ agent_idx = 0 ,
+ code = code ,
+ game_state = None
+ )
+
+ def _initial_setup ( self ) -> str :
+ """Initial setup and exploration"""
+ return '''
+# Initial setup and exploration
+print("Starting BasicAgent exploration")
+
+# Get current position
+position = get_position()
+print(f"Starting position: {position} ")
+
+# Explore the area
+entities = get_entities()
+print(f"Found {len(entities)} entities")
+
+# Look for resources
+iron_pos = nearest(Resource.IRON_ORE)
+copper_pos = nearest(Resource.COPPER_ORE)
+coal_pos = nearest(Resource.COAL)
+
+print(f"Iron ore at: {iron_pos} ")
+print(f"Copper ore at: {copper_pos} ")
+print(f"Coal at: {coal_pos} ")
+'''
+
+ def _setup_mining ( self ) -> str :
+ """Set up mining operations"""
+ return '''
+# Set up mining operations
+print("Setting up mining operations")
+
+# Find and place mining drills
+iron_pos = nearest(Resource.IRON_ORE)
+if iron_pos:
+ drill = place_entity(
+ entity=Prototype.MiningDrill,
+ position=iron_pos,
+ direction=Direction.NORTH
+ )
+ print(f"Placed mining drill at {iron_pos} ")
+
+ # Add storage chest
+ chest = place_entity_next_to(
+ entity=Prototype.IronChest,
+ reference_position=drill.drop_position,
+ direction=Direction.SOUTH
+ )
+ print(f"Placed chest at {chest.position} ")
+
+# Check inventory
+inventory = inspect_inventory()
+print(f"Current inventory: {inventory} ")
+'''
+
+ def _monitor_and_optimize ( self , entities : List , inventory : Dict ) -> str :
+ """Monitor and optimize operations"""
+ return '''
+# Monitor and optimize operations
+print("Monitoring operations")
+
+# Check all entities
+entities = get_entities()
+working_entities = [e for e in entities if hasattr(e, 'status') and e.status == EntityStatus.WORKING]
+print(f"Working entities: {len(working_entities)}")
+
+# Check inventory
+inventory = inspect_inventory()
+total_items = sum(inventory.values())
+print(f"Total items in inventory: {total_items} ")
+
+# Print detailed inventory
+for item, count in inventory.items():
+ if count > 0:
+ print(f" {item} : {count} ")
+
+# Check for any issues
+for entity in entities:
+ if hasattr(entity, 'status') and entity.status == EntityStatus.NO_POWER:
+ print(f"Entity {entity.name} needs power")
+ elif hasattr(entity, 'status') and entity.status == EntityStatus.NO_FUEL:
+ print(f"Entity {entity.name} needs fuel")
+'''
+
+
+
+
+Running the Agent
+
+Environment Setup import gym
+from fle.agents.basic_agent import BasicAgent
+
+# Create environment
+env = gym . make ( "iron_ore_throughput" )
+
+# Create agent
+agent = BasicAgent ({})
+
+# Run episode
+obs = env . reset ()
+done = False
+step = 0
+
+while not done and step < 100 :
+ action = agent . act ( obs )
+ obs , reward , terminated , truncated , info = env . step ( action )
+ done = terminated or truncated
+ step += 1
+ print ( f "Step { step } : Reward = { reward } " )
+
+env . close ()
+
+
+
+Command Line Usage # Run basic agent evaluation
+fle eval --agent basic_agent --config configs/basic_agent_config.json
+
+
+
+
+
+
+Agent Configuration
+
+Basic Configuration {
+ "agent_type" : "BasicAgent" ,
+ "config" : {
+ "target_resources" : [ "iron-ore" , "copper-ore" , "coal" ],
+ "max_mining_setups" : 5 ,
+ "monitoring_interval" : 10
+ },
+ "evaluation" : {
+ "episodes" : 5 ,
+ "max_steps" : 1000 ,
+ "success_threshold" : 0.5
+ }
+}
+
+
+
+Advanced Configuration {
+ "agent_type" : "BasicAgent" ,
+ "config" : {
+ "target_resources" : [ "iron-ore" , "copper-ore" , "coal" , "stone" ],
+ "max_mining_setups" : 10 ,
+ "monitoring_interval" : 5 ,
+ "optimization_enabled" : true ,
+ "debug_mode" : true
+ },
+ "evaluation" : {
+ "episodes" : 10 ,
+ "max_steps" : 2000 ,
+ "success_threshold" : 0.8 ,
+ "metrics" : [ "throughput" , "efficiency" , "resource_utilization" ]
+ }
+}
+
+
+
+
+
+
+Agent Behavior
+
+Phase 1: Exploration (Steps 1-5)
+
+Phase 2: Setup (Steps 6-15)
+
+Phase 3: Monitoring (Steps 16+)
+Monitor entity status
+Check inventory levels
+Optimize operations
+
+
+
+
+
+Example Output
+
+Step 1: Initial Setup Starting BasicAgent exploration
+Starting position : Position ( x = 0.0 , y = 0.0 )
+Found 0 entities
+Iron ore at : Position ( x =- 28.0 , y =- 61.0 )
+Copper ore at : Position ( x = 45.0 , y =- 30.0 )
+Coal at : Position ( x =- 15.0 , y = 20.0 )
+
+
+
+Step 5: Mining Setup Setting up mining operations
+Placed mining drill at Position ( x =- 28.0 , y =- 61.0 )
+Placed chest at Position ( x =- 27.5 , y =- 59.5 )
+Current inventory : { 'iron-ore' : 0 , 'coal' : 4 }
+
+
+
+Step 20: Monitoring Monitoring operations
+Working entities : 1
+Total items in inventory : 75
+ iron - ore : 75
+ coal : 4
+
+
+
+
+
+
+
+Troubleshooting
+
+Common Issues
+No resources found : Check map generation and resource placement
+Mining drills not working : Verify power and fuel supply
+Inventory full : Add more storage or optimize collection
+
+
+Debug Mode Enable debug mode for detailed logging:
+{
+ "config" : {
+ "debug_mode" : true ,
+ "log_level" : "DEBUG"
+ }
+}
+
+
+
+Performance Issues
+Monitor entity count and performance
+Check for resource bottlenecks
+Optimize automation chains
+
+
+
+
+
+Best Practices
+
+Start Simple : Begin with basic operations
+Monitor Progress : Track performance metrics
+Handle Errors : Implement error recovery
+Optimize Gradually : Improve efficiency over time
+Test Thoroughly : Validate all scenarios
+Document Behavior : Record agent decisions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/examples/multiagent.html b/docs/sphinx/build/html/examples/multiagent.html
new file mode 100644
index 000000000..a6ab3af5b
--- /dev/null
+++ b/docs/sphinx/build/html/examples/multiagent.html
@@ -0,0 +1,751 @@
+
+
+
+
+
+
+
+
+
Multi-Agent Example — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+ Multi-Agent Example
+
+
+
+
+
+
+
+
+
+Multi-Agent Example
+This example demonstrates how to create and coordinate multiple agents in the Factorio Learning Environment.
+
+Multi-Agent Overview
+Multi-agent systems in FLE enable:
+
+Agent Coordination : Multiple agents working together
+Task Distribution : Dividing tasks among agents
+Communication : Inter-agent message passing
+Collaborative Planning : Joint decision making
+
+
+
+Agent Architecture
+
+Agent Roles
+Coordinator : Manages overall strategy
+Resource Specialist : Handles resource collection
+Construction Specialist : Manages building operations
+Research Specialist : Handles technology advancement
+
+
+Communication Protocol
+
+
+
+
+Multi-Agent Implementation
+from fle.agents.agent_abc import Agent
+from fle.env.gym_env.action import Action
+from fle.env.game_types import Position , Direction
+from typing import Dict , Any , List
+import json
+
+class MultiAgentCoordinator ( Agent ):
+ def __init__ ( self , config : Dict [ str , Any ]):
+ super () . __init__ ( config )
+ self . name = "MultiAgentCoordinator"
+ self . agent_count = config . get ( 'agent_count' , 3 )
+ self . agents = self . _initialize_agents ( config )
+ self . shared_state = {}
+ self . task_queue = []
+ self . step_count = 0
+
+ def _initialize_agents ( self , config : Dict [ str , Any ]) -> List [ Agent ]:
+ """Initialize specialized agents"""
+ agents = []
+
+ # Resource specialist
+ agents . append ( ResourceSpecialist ({
+ 'role' : 'resource_specialist' ,
+ 'target_resources' : [ 'iron-ore' , 'copper-ore' , 'coal' ]
+ }))
+
+ # Construction specialist
+ agents . append ( ConstructionSpecialist ({
+ 'role' : 'construction_specialist' ,
+ 'building_types' : [ 'assembling-machine' , 'furnace' , 'lab' ]
+ }))
+
+ # Research specialist
+ agents . append ( ResearchSpecialist ({
+ 'role' : 'research_specialist' ,
+ 'research_priorities' : [ 'automation' , 'logistics' , 'production' ]
+ }))
+
+ return agents
+
+ def act ( self , observation : Dict [ str , Any ]) -> Action :
+ """Coordinate multi-agent actions"""
+ self . step_count += 1
+
+ # Get messages from other agents
+ messages = observation . get ( 'messages' , [])
+
+ # Process messages and update shared state
+ self . _process_messages ( messages )
+
+ # Coordinate agent actions
+ if self . step_count == 1 :
+ code = self . _initial_coordination ()
+ elif self . step_count <= 20 :
+ code = self . _task_distribution ()
+ else :
+ code = self . _monitoring_and_optimization ()
+
+ return Action (
+ agent_idx = 0 ,
+ code = code ,
+ game_state = None
+ )
+
+ def _process_messages ( self , messages : List [ Dict [ str , Any ]]):
+ """Process messages from other agents"""
+ for message in messages :
+ if message [ 'type' ] == 'task_completion' :
+ self . _handle_task_completion ( message )
+ elif message [ 'type' ] == 'resource_request' :
+ self . _handle_resource_request ( message )
+ elif message [ 'type' ] == 'coordination_request' :
+ self . _handle_coordination_request ( message )
+
+ def _initial_coordination ( self ) -> str :
+ """Initial coordination and planning"""
+ return '''
+# Initial multi-agent coordination
+print("Starting multi-agent coordination")
+
+# Send initial messages to all agents
+send_message({
+ 'type': 'coordination_start',
+ 'content': 'Beginning multi-agent coordination',
+ 'target_agents': 'all'
+})
+
+# Analyze current state
+entities = get_entities()
+inventory = inspect_inventory()
+
+print(f"Current state: {len(entities)} entities, {sum(inventory.values())} items")
+
+# Plan initial tasks
+tasks = [
+ {'type': 'resource_collection', 'priority': 'high', 'agent': 'resource_specialist'},
+ {'type': 'basic_setup', 'priority': 'medium', 'agent': 'construction_specialist'},
+ {'type': 'research_planning', 'priority': 'low', 'agent': 'research_specialist'}
+]
+
+print(f"Planned tasks: {tasks} ")
+'''
+
+ def _task_distribution ( self ) -> str :
+ """Distribute tasks among agents"""
+ return '''
+# Task distribution and coordination
+print("Distributing tasks among agents")
+
+# Check for available resources
+iron_pos = nearest(Resource.IRON_ORE)
+copper_pos = nearest(Resource.COPPER_ORE)
+
+if iron_pos:
+ # Assign resource collection task
+ send_message({
+ 'type': 'task_assignment',
+ 'content': {
+ 'task': 'collect_iron_ore',
+ 'location': str(iron_pos),
+ 'priority': 'high'
+ },
+ 'target_agents': ['resource_specialist']
+ })
+
+if copper_pos:
+ # Assign copper collection task
+ send_message({
+ 'type': 'task_assignment',
+ 'content': {
+ 'task': 'collect_copper_ore',
+ 'location': str(copper_pos),
+ 'priority': 'medium'
+ },
+ 'target_agents': ['resource_specialist']
+ })
+
+# Check construction needs
+entities = get_entities()
+if len(entities) < 5:
+ send_message({
+ 'type': 'task_assignment',
+ 'content': {
+ 'task': 'build_infrastructure',
+ 'requirements': ['mining_drill', 'chest', 'furnace'],
+ 'priority': 'high'
+ },
+ 'target_agents': ['construction_specialist']
+ })
+'''
+
+ def _monitoring_and_optimization ( self ) -> str :
+ """Monitor and optimize multi-agent operations"""
+ return '''
+# Multi-agent monitoring and optimization
+print("Monitoring multi-agent operations")
+
+# Check agent status
+entities = get_entities()
+inventory = inspect_inventory()
+
+print(f"Current state: {len(entities)} entities, {sum(inventory.values())} items")
+
+# Check for coordination issues
+working_entities = [e for e in entities if hasattr(e, 'status') and e.status == EntityStatus.WORKING]
+print(f"Working entities: {len(working_entities)}")
+
+# Send status updates
+send_message({
+ 'type': 'status_update',
+ 'content': {
+ 'entities': len(entities),
+ 'inventory': sum(inventory.values()),
+ 'working_entities': len(working_entities)
+ },
+ 'target_agents': 'all'
+})
+
+# Check for optimization opportunities
+if len(working_entities) < len(entities) * 0.8:
+ send_message({
+ 'type': 'optimization_request',
+ 'content': 'System efficiency below 80%',
+ 'target_agents': 'all'
+ })
+'''
+
+
+
+
+Specialized Agents
+
+Resource Specialist class ResourceSpecialist ( Agent ):
+ def __init__ ( self , config : Dict [ str , Any ]):
+ super () . __init__ ( config )
+ self . name = "ResourceSpecialist"
+ self . target_resources = config . get ( 'target_resources' , [])
+ self . mining_setups = []
+
+ def act ( self , observation : Dict [ str , Any ]) -> Action :
+ """Handle resource collection tasks"""
+ messages = observation . get ( 'messages' , [])
+
+ # Process task assignments
+ for message in messages :
+ if message [ 'type' ] == 'task_assignment' :
+ task = message [ 'content' ]
+ if task [ 'task' ] . startswith ( 'collect_' ):
+ return self . _handle_collection_task ( task )
+
+ # Default resource collection behavior
+ return self . _default_resource_behavior ()
+
+ def _handle_collection_task ( self , task : Dict [ str , Any ]) -> Action :
+ """Handle specific collection tasks"""
+ resource_type = task [ 'task' ] . split ( '_' )[ 1 ]
+ location = task . get ( 'location' )
+
+ code = f '''
+
+
+# Handle collection task: {task[‘task’]}
+print(“Resource specialist handling collection task”)
+# Find and collect {resource_type}
+resource_pos = nearest(Resource.{resource_type.upper().replace(‘-’, ‘_’)})
+if resource_pos:
+
+
+drill = place_entity( entity=Prototype.MiningDrill,
+position=resource_pos,
+direction=Direction.NORTH
+
+
+
)
+print(f”Placed mining drill for {resource_type} at {resource_pos}”)
+
# Report task completion
+send_message({{
+
+‘type’: ‘task_completion’,
+‘content’: {{
+
+‘task’: ‘{task[‘task’]}’,
+‘status’: ‘completed’,
+‘location’: str(resource_pos)
+
+
}},
+‘target_agents’: [‘coordinator’]
+
+
}})
+
+‘’’
+
+return Action(agent_idx=1, code=code, game_state=None)
+
+
+Construction Specialist class ConstructionSpecialist ( Agent ):
+ def __init__ ( self , config : Dict [ str , Any ]):
+ super () . __init__ ( config )
+ self . name = "ConstructionSpecialist"
+ self . building_types = config . get ( 'building_types' , [])
+ self . construction_queue = []
+
+ def act ( self , observation : Dict [ str , Any ]) -> Action :
+ """Handle construction tasks"""
+ messages = observation . get ( 'messages' , [])
+
+ # Process construction requests
+ for message in messages :
+ if message [ 'type' ] == 'task_assignment' :
+ task = message [ 'content' ]
+ if task [ 'task' ] == 'build_infrastructure' :
+ return self . _handle_infrastructure_task ( task )
+
+ # Default construction behavior
+ return self . _default_construction_behavior ()
+
+ def _handle_infrastructure_task ( self , task : Dict [ str , Any ]) -> Action :
+ """Handle infrastructure construction"""
+ requirements = task . get ( 'requirements' , [])
+
+ code = f '''
+
+
+# Handle infrastructure construction
+print(“Construction specialist building infrastructure”)
+# Build required entities
+entities = get_entities()
+current_types = [e.name for e in entities]
+
+for requirement in {requirements}:
+if requirement not in current_types: # Build the required entity
+if requirement == ‘mining_drill’:
+
+resource_pos = nearest(Resource.IRON_ORE)
+if resource_pos:
+
+
+drill = place_entity( entity=Prototype.MiningDrill,
+position=resource_pos,
+direction=Direction.NORTH
+
+
+
)
+print(f”Built {requirement} at {resource_pos}”)
+
+
+
+elif requirement == ‘chest’: # Place chest near existing entities
+if entities:
+
+reference = entities[0]
+chest = place_entity_next_to(
+
+entity=Prototype.IronChest,
+reference_position=reference.position,
+direction=Direction.SOUTH
+
+
)
+print(f”Built {requirement} at {chest.position}”)
+
+
+
+
+
+
+
+# Report construction completion
+send_message({{
+
+‘type’: ‘task_completion’,
+‘content’: {{
+
+‘task’: ‘build_infrastructure’,
+‘status’: ‘completed’,
+‘entities_built’: len(get_entities())
+
+
}},
+‘target_agents’: [‘coordinator’]
+
+
+return Action(agent_idx=2, code=code, game_state=None)
+
+
+Research Specialist class ResearchSpecialist ( Agent ):
+ def __init__ ( self , config : Dict [ str , Any ]):
+ super () . __init__ ( config )
+ self . name = "ResearchSpecialist"
+ self . research_priorities = config . get ( 'research_priorities' , [])
+ self . research_queue = []
+
+ def act ( self , observation : Dict [ str , Any ]) -> Action :
+ """Handle research tasks"""
+ messages = observation . get ( 'messages' , [])
+
+ # Process research requests
+ for message in messages :
+ if message [ 'type' ] == 'task_assignment' :
+ task = message [ 'content' ]
+ if task [ 'task' ] == 'research_planning' :
+ return self . _handle_research_planning ( task )
+
+ # Default research behavior
+ return self . _default_research_behavior ()
+
+ def _handle_research_planning ( self , task : Dict [ str , Any ]) -> Action :
+ """Handle research planning tasks"""
+ code = '''
+
+
+# Handle research planning
+print(“Research specialist planning research”)
+# Check current research status
+research = get_research_progress()
+print(f”Current research: {research}”)
+# Plan research priorities
+priorities = [‘automation’, ‘logistics’, ‘production’]
+for priority in priorities:
+
+
+if priority not in research.get(‘completed’, []): # Start research
+result = set_research(priority)
+if result:
+
+print(f”Started research: {priority}”)
+break
+
+
+
+
+# Report research status
+send_message({
+
+‘type’: ‘task_completion’,
+‘content’: {
+
+‘task’: ‘research_planning’,
+‘status’: ‘completed’,
+‘research_started’: priority
+
+
},
+‘target_agents’: [‘coordinator’]
+
+
+return Action(agent_idx=3, code=code, game_state=None)
+
+
+
+
+
+Running Multi-Agent Systems
+
+Environment Setup import gym
+from fle.agents.multiagent_coordinator import MultiAgentCoordinator
+
+# Create environment
+env = gym . make ( "iron_ore_throughput" )
+
+# Create multi-agent coordinator
+coordinator = MultiAgentCoordinator ({
+ 'agent_count' : 3 ,
+ 'coordination_enabled' : True ,
+ 'communication_enabled' : True
+})
+
+# Run episode
+obs = env . reset ()
+done = False
+step = 0
+
+while not done and step < 100 :
+ action = coordinator . act ( obs )
+ obs , reward , terminated , truncated , info = env . step ( action )
+ done = terminated or truncated
+ step += 1
+ print ( f "Step { step } : Reward = { reward } " )
+
+env . close ()
+
+
+
+Command Line Usage # Run multi-agent evaluation
+fle eval --agent multiagent_coordinator --config configs/multiagent_config.json
+
+
+
+
+
+
+Multi-Agent Configuration
+
+Basic Configuration {
+ "agent_type" : "MultiAgentCoordinator" ,
+ "config" : {
+ "agent_count" : 3 ,
+ "coordination_enabled" : true ,
+ "communication_enabled" : true ,
+ "task_distribution" : "round_robin"
+ },
+ "evaluation" : {
+ "episodes" : 5 ,
+ "max_steps" : 1000 ,
+ "success_threshold" : 0.7
+ }
+}
+
+
+
+Advanced Configuration {
+ "agent_type" : "MultiAgentCoordinator" ,
+ "config" : {
+ "agent_count" : 5 ,
+ "coordination_enabled" : true ,
+ "communication_enabled" : true ,
+ "task_distribution" : "priority_based" ,
+ "conflict_resolution" : "voting" ,
+ "shared_state_size" : 1000 ,
+ "message_timeout" : 30
+ },
+ "evaluation" : {
+ "episodes" : 10 ,
+ "max_steps" : 2000 ,
+ "success_threshold" : 0.8 ,
+ "metrics" : [ "coordination_effectiveness" , "communication_efficiency" , "task_completion_rate" ]
+ }
+}
+
+
+
+
+
+
+
+Troubleshooting
+
+Coordination Issues
+Task conflicts : Implement conflict resolution
+Communication failures : Check message delivery
+Coordination breakdown : Monitor coordination effectiveness
+
+
+Performance Issues
+Slow coordination : Optimize coordination algorithms
+High communication overhead : Reduce message frequency
+Memory issues : Limit shared state size
+
+
+Agent Issues
+Agent failures : Implement agent recovery
+Specialization problems : Adjust agent roles
+Communication errors : Handle message errors
+
+
+
+
+
+Best Practices
+
+Clear Roles : Define clear agent roles and responsibilities
+Effective Communication : Implement efficient communication protocols
+Conflict Resolution : Handle conflicts between agents
+Performance Monitoring : Monitor multi-agent performance
+Scalability : Design for different numbers of agents
+Error Handling : Implement robust error recovery
+Testing : Test multi-agent coordination thoroughly
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/examples/visual_agent.html b/docs/sphinx/build/html/examples/visual_agent.html
new file mode 100644
index 000000000..46ae30e79
--- /dev/null
+++ b/docs/sphinx/build/html/examples/visual_agent.html
@@ -0,0 +1,610 @@
+
+
+
+
+
+
+
+
+
Visual Agent Example — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+ Visual Agent Example
+
+
+
+
+
+
+
+
+
+Visual Agent Example
+This example demonstrates how to create a visual agent that processes visual information from the game environment.
+
+Agent Overview
+The visual agent uses computer vision techniques to:
+
+Image Processing : Analyze game screenshots and map images
+Object Detection : Identify entities and resources in the visual data
+Spatial Reasoning : Understand spatial relationships between objects
+Visual Planning : Plan actions based on visual information
+
+
+
+Agent Implementation
+from fle.agents.agent_abc import Agent
+from fle.env.gym_env.action import Action
+from fle.env.game_types import Position , Direction
+from typing import Dict , Any , List
+import base64
+import io
+from PIL import Image
+import numpy as np
+
+class VisualAgent ( Agent ):
+ def __init__ ( self , config : Dict [ str , Any ]):
+ super () . __init__ ( config )
+ self . name = "VisualAgent"
+ self . vision_enabled = config . get ( 'vision_enabled' , True )
+ self . image_processing = config . get ( 'image_processing' , True )
+ self . spatial_reasoning = config . get ( 'spatial_reasoning' , True )
+ self . visual_memory = {}
+ self . step_count = 0
+
+ def act ( self , observation : Dict [ str , Any ]) -> Action :
+ """Generate action based on visual observation"""
+ self . step_count += 1
+
+ # Get visual information
+ map_image = observation . get ( 'map_image' , '' )
+ entities = observation . get ( 'entities' , [])
+ inventory = observation . get ( 'inventory' , {})
+
+ # Process visual information
+ if self . vision_enabled and map_image :
+ visual_analysis = self . _analyze_visual_data ( map_image )
+ else :
+ visual_analysis = {}
+
+ # Generate action based on visual analysis
+ if self . step_count == 1 :
+ code = self . _initial_visual_exploration ( visual_analysis )
+ elif self . step_count <= 10 :
+ code = self . _visual_setup ( visual_analysis , entities )
+ else :
+ code = self . _visual_monitoring ( visual_analysis , entities , inventory )
+
+ return Action (
+ agent_idx = 0 ,
+ code = code ,
+ game_state = None
+ )
+
+ def _analyze_visual_data ( self , map_image : str ) -> Dict [ str , Any ]:
+ """Analyze visual data from map image"""
+ try :
+ # Decode base64 image
+ image_data = base64 . b64decode ( map_image )
+ image = Image . open ( io . BytesIO ( image_data ))
+
+ # Convert to numpy array
+ img_array = np . array ( image )
+
+ # Perform visual analysis
+ analysis = {
+ 'image_size' : image . size ,
+ 'image_mode' : image . mode ,
+ 'dominant_colors' : self . _extract_dominant_colors ( img_array ),
+ 'entity_locations' : self . _detect_entities ( img_array ),
+ 'resource_patches' : self . _detect_resource_patches ( img_array ),
+ 'spatial_features' : self . _extract_spatial_features ( img_array )
+ }
+
+ return analysis
+
+ except Exception as e :
+ print ( f "Visual analysis error: { e } " )
+ return {}
+
+ def _extract_dominant_colors ( self , img_array : np . ndarray ) -> List [ tuple ]:
+ """Extract dominant colors from image"""
+ # Reshape image to 2D array of pixels
+ pixels = img_array . reshape ( - 1 , img_array . shape [ - 1 ])
+
+ # Simple color extraction (in practice, use more sophisticated methods)
+ unique_colors = np . unique ( pixels , axis = 0 )
+ return unique_colors [: 10 ] . tolist () # Return top 10 colors
+
+ def _detect_entities ( self , img_array : np . ndarray ) -> List [ Dict [ str , Any ]]:
+ """Detect entities in the image"""
+ # Simple entity detection (in practice, use computer vision models)
+ entities = []
+
+ # Look for specific color patterns that might indicate entities
+ # This is a simplified example
+ for y in range ( 0 , img_array . shape [ 0 ], 10 ):
+ for x in range ( 0 , img_array . shape [ 1 ], 10 ):
+ pixel = img_array [ y , x ]
+ if self . _is_entity_pixel ( pixel ):
+ entities . append ({
+ 'position' : ( x , y ),
+ 'type' : self . _classify_entity ( pixel ),
+ 'confidence' : 0.8
+ })
+
+ return entities
+
+ def _detect_resource_patches ( self , img_array : np . ndarray ) -> List [ Dict [ str , Any ]]:
+ """Detect resource patches in the image"""
+ resource_patches = []
+
+ # Look for resource-specific color patterns
+ for y in range ( 0 , img_array . shape [ 0 ], 20 ):
+ for x in range ( 0 , img_array . shape [ 1 ], 20 ):
+ region = img_array [ y : y + 20 , x : x + 20 ]
+ if self . _is_resource_region ( region ):
+ resource_patches . append ({
+ 'position' : ( x , y ),
+ 'type' : self . _classify_resource ( region ),
+ 'size' : self . _estimate_resource_size ( region )
+ })
+
+ return resource_patches
+
+ def _extract_spatial_features ( self , img_array : np . ndarray ) -> Dict [ str , Any ]:
+ """Extract spatial features from the image"""
+ return {
+ 'image_center' : ( img_array . shape [ 1 ] // 2 , img_array . shape [ 0 ] // 2 ),
+ 'image_bounds' : ( 0 , 0 , img_array . shape [ 1 ], img_array . shape [ 0 ]),
+ 'density_map' : self . _calculate_density_map ( img_array ),
+ 'connectivity' : self . _analyze_connectivity ( img_array )
+ }
+
+ def _initial_visual_exploration ( self , visual_analysis : Dict [ str , Any ]) -> str :
+ """Initial visual exploration"""
+ return f '''
+# Initial visual exploration
+print("Starting VisualAgent exploration")
+
+# Analyze visual data
+visual_analysis = { visual_analysis }
+print(f"Visual analysis: { visual_analysis } ")
+
+# Get current position
+position = get_position()
+print(f"Starting position: {{ position }} ")
+
+# Look for resources using visual analysis
+if visual_analysis.get('resource_patches'):
+ for patch in visual_analysis['resource_patches']:
+ print(f"Found resource patch: {{ patch['type'] }} at {{ patch['position'] }} ")
+
+# Look for entities using visual analysis
+if visual_analysis.get('entity_locations'):
+ for entity in visual_analysis['entity_locations']:
+ print(f"Found entity: {{ entity['type'] }} at {{ entity['position'] }} ")
+'''
+
+ def _visual_setup ( self , visual_analysis : Dict [ str , Any ], entities : List ) -> str :
+ """Set up operations based on visual analysis"""
+ return '''
+# Visual-based setup
+print("Setting up operations based on visual analysis")
+
+# Find resources using visual cues
+iron_pos = nearest(Resource.IRON_ORE)
+copper_pos = nearest(Resource.COPPER_ORE)
+
+if iron_pos:
+ # Place mining drill with visual guidance
+ drill = place_entity(
+ entity=Prototype.MiningDrill,
+ position=iron_pos,
+ direction=Direction.NORTH
+ )
+ print(f"Placed mining drill at {iron_pos} based on visual analysis")
+
+ # Add storage with visual positioning
+ chest = place_entity_next_to(
+ entity=Prototype.IronChest,
+ reference_position=drill.drop_position,
+ direction=Direction.SOUTH
+ )
+ print(f"Placed chest at {chest.position} ")
+
+# Check visual feedback
+entities = get_entities()
+print(f"Current entities: {len(entities)}")
+'''
+
+ def _visual_monitoring ( self , visual_analysis : Dict [ str , Any ], entities : List , inventory : Dict ) -> str :
+ """Monitor operations using visual feedback"""
+ return '''
+# Visual monitoring
+print("Monitoring operations with visual feedback")
+
+# Check entities
+entities = get_entities()
+working_entities = [e for e in entities if hasattr(e, 'status') and e.status == EntityStatus.WORKING]
+print(f"Working entities: {len(working_entities)}")
+
+# Check inventory
+inventory = inspect_inventory()
+total_items = sum(inventory.values())
+print(f"Total items: {total_items} ")
+
+# Visual analysis feedback
+if visual_analysis:
+ print(f"Visual analysis: {visual_analysis} ")
+ if 'spatial_features' in visual_analysis:
+ features = visual_analysis['spatial_features']
+ print(f"Spatial features: {features} ")
+'''
+
+
+
+
+Visual Processing Features
+
+Image Analysis
+Dominant color extraction
+Entity detection and classification
+Resource patch identification
+Spatial feature extraction
+
+
+Computer Vision Techniques
+Edge detection
+Color segmentation
+Object recognition
+Spatial reasoning
+
+
+Visual Memory
+
+
+
+
+Example Visual Analysis
+
+Input Image Base64 encoded PNG image of the game map
+
+Output Analysis {
+ 'image_size' : ( 1024 , 1024 ),
+ 'image_mode' : 'RGB' ,
+ 'dominant_colors' : [
+ [ 0 , 0 , 0 ], # Black (background)
+ [ 139 , 69 , 19 ], # Brown (dirt)
+ [ 128 , 128 , 128 ], # Gray (stone)
+ [ 255 , 215 , 0 ] # Gold (resources)
+ ],
+ 'entity_locations' : [
+ {
+ 'position' : ( 512 , 256 ),
+ 'type' : 'mining_drill' ,
+ 'confidence' : 0.9
+ },
+ {
+ 'position' : ( 520 , 264 ),
+ 'type' : 'chest' ,
+ 'confidence' : 0.8
+ }
+ ],
+ 'resource_patches' : [
+ {
+ 'position' : ( 100 , 200 ),
+ 'type' : 'iron_ore' ,
+ 'size' : 'large'
+ },
+ {
+ 'position' : ( 300 , 400 ),
+ 'type' : 'copper_ore' ,
+ 'size' : 'medium'
+ }
+ ],
+ 'spatial_features' : {
+ 'image_center' : ( 512 , 512 ),
+ 'image_bounds' : ( 0 , 0 , 1024 , 1024 ),
+ 'density_map' : { ... },
+ 'connectivity' : { ... }
+ }
+}
+
+
+
+
+
+
+Running the Visual Agent
+
+Environment Setup import gym
+from fle.agents.visual_agent import VisualAgent
+
+# Create environment
+env = gym . make ( "iron_ore_throughput" )
+
+# Create visual agent
+agent = VisualAgent ({
+ 'vision_enabled' : True ,
+ 'image_processing' : True ,
+ 'spatial_reasoning' : True
+})
+
+# Run episode
+obs = env . reset ()
+done = False
+step = 0
+
+while not done and step < 100 :
+ action = agent . act ( obs )
+ obs , reward , terminated , truncated , info = env . step ( action )
+ done = terminated or truncated
+ step += 1
+ print ( f "Step { step } : Reward = { reward } " )
+
+env . close ()
+
+
+
+Command Line Usage # Run visual agent evaluation
+fle eval --agent visual_agent --config configs/visual_agent_config.json
+
+
+
+
+
+
+Agent Configuration
+
+Basic Configuration {
+ "agent_type" : "VisualAgent" ,
+ "config" : {
+ "vision_enabled" : true ,
+ "image_processing" : true ,
+ "spatial_reasoning" : true ,
+ "visual_memory_size" : 100
+ },
+ "evaluation" : {
+ "episodes" : 5 ,
+ "max_steps" : 1000 ,
+ "success_threshold" : 0.6
+ }
+}
+
+
+
+Advanced Configuration {
+ "agent_type" : "VisualAgent" ,
+ "config" : {
+ "vision_enabled" : true ,
+ "image_processing" : true ,
+ "spatial_reasoning" : true ,
+ "visual_memory_size" : 1000 ,
+ "computer_vision_model" : "resnet50" ,
+ "object_detection_threshold" : 0.7 ,
+ "spatial_analysis_depth" : 3
+ },
+ "evaluation" : {
+ "episodes" : 10 ,
+ "max_steps" : 2000 ,
+ "success_threshold" : 0.8 ,
+ "metrics" : [ "visual_accuracy" , "spatial_reasoning" , "object_detection" ]
+ }
+}
+
+
+
+
+
+
+
+Troubleshooting
+
+Visual Processing Issues
+Poor image quality : Check image resolution and format
+Detection failures : Adjust detection thresholds
+Memory issues : Reduce visual memory size
+
+
+Performance Issues
+Slow processing : Optimize image processing algorithms
+High memory usage : Implement image compression
+CPU bottlenecks : Use parallel processing
+
+
+Accuracy Issues
+False positives : Adjust detection thresholds
+Missed objects : Improve detection algorithms
+Spatial errors : Enhance spatial reasoning
+
+
+
+
+
+Best Practices
+
+Image Quality : Ensure high-quality input images
+Detection Thresholds : Tune detection parameters
+Memory Management : Monitor and optimize memory usage
+Performance Optimization : Use efficient algorithms
+Error Handling : Implement robust error recovery
+Visual Memory : Maintain useful visual information
+Spatial Reasoning : Develop strong spatial understanding
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/genindex.html b/docs/sphinx/build/html/genindex.html
new file mode 100644
index 000000000..a4870fa04
--- /dev/null
+++ b/docs/sphinx/build/html/genindex.html
@@ -0,0 +1,2338 @@
+
+
+
+
+
+
+
+
Index — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+
Index
+
+
+
_
+ |
A
+ |
B
+ |
C
+ |
D
+ |
E
+ |
F
+ |
G
+ |
H
+ |
I
+ |
K
+ |
L
+ |
M
+ |
N
+ |
O
+ |
P
+ |
Q
+ |
R
+ |
S
+ |
T
+ |
U
+ |
V
+ |
W
+ |
X
+ |
Y
+
+
+
_
+
+
+
A
+
+
+
B
+
+
+
C
+
+
+
D
+
+
+
E
+
+
+
F
+
+
+
G
+
+
+
H
+
+
+
I
+
+
+
K
+
+
+
L
+
+
+
M
+
+
+
N
+
+
+
O
+
+
+
P
+
+
+
Q
+
+
+
R
+
+
+
S
+
+
+
T
+
+
+
U
+
+
+
V
+
+
+
W
+
+
+
X
+
+
+
Y
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/getting_started/cluster.html b/docs/sphinx/build/html/getting_started/cluster.html
new file mode 100644
index 000000000..58c833a76
--- /dev/null
+++ b/docs/sphinx/build/html/getting_started/cluster.html
@@ -0,0 +1,231 @@
+
+
+
+
+
+
+
+
+
Cluster Setup — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+Cluster Setup
+FLE uses Docker to run Factorio servers in a cluster configuration. This allows for scalable evaluation of agents across multiple game instances.
+
+Starting a Cluster
+# Start Factorio cluster
+fle cluster start
+
+
+This command will:
+
+Start Docker containers running Factorio servers
+Configure networking between containers
+Set up the evaluation environment
+Create necessary directories and configurations
+
+
+
+Cluster Management
+The cluster system provides several management commands:
+# Check cluster status
+fle cluster status
+
+# Stop the cluster
+fle cluster stop
+
+# Restart the cluster
+fle cluster restart
+
+
+
+
+Configuration
+Cluster configuration is managed through:
+
+.env file: Environment variables for cluster setup
+configs/ directory: Configuration files for different scenarios
+Docker Compose: Container orchestration
+
+The cluster automatically creates these files on first run.
+
+
+Scenarios
+FLE supports different game scenarios:
+
+Each scenario can be configured with different parameters:
+
+
+
+Troubleshooting
+
+Docker Issues
+Ensure your user has permission to run Docker without sudo
+Check that Docker is running: docker ps
+Verify available disk space and memory
+
+
+Connection Issues
+Make sure the Factorio server is running and ports are properly configured
+Check firewall settings for required ports
+Verify network connectivity between containers
+
+
+Resource Issues
+Monitor Docker resource usage: docker stats
+Adjust memory limits if needed
+Check available disk space for game saves
+
+
+
+
+
+Advanced Configuration
+For advanced users, you can customize:
+
+Container resource limits
+Network configurations
+Volume mounts for persistent data
+Custom Factorio mods and scenarios
+
+See the customization guide for more details.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/getting_started/installation.html b/docs/sphinx/build/html/getting_started/installation.html
new file mode 100644
index 000000000..18c1d3ff4
--- /dev/null
+++ b/docs/sphinx/build/html/getting_started/installation.html
@@ -0,0 +1,251 @@
+
+
+
+
+
+
+
+
+
Installation — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+Installation
+
+
+Installation
+Core FLE SDK package:
+ pip install factorio-learning-environment
+uv add factorio-learning-environment
+
+
+With optional features:
+# For running experiments
+pip install factorio-learning-environment[ eval]
+
+# For MCP protocol support
+pip install factorio-learning-environment[ mcp]
+
+# For PostgreSQL support
+pip install factorio-learning-environment[ psql]
+
+# All features
+pip install factorio-learning-environment[ eval,mcp,psql]
+
+
+Using uv (recommended):
+ uv add factorio-learning-environment[ eval]
+
+
+
+
+Client-side Setup (Optional)
+For rendering graphics, set up the Factorio client:
+
+Set up Factorio client :
+- Purchase Factorio from the official website (recommended) or on Steam.
+- Downgrade to version 1.1.110:
+
+
+Steam: Right-click Factorio → Properties → Betas → Select 1.1.110
+Important : Make sure to uncheck the Space Age DLC if you have it, as it forces the 2.x branch
+
+
+
+Activate server :
+- Open Factorio client
+- Navigate to _Multiplayer_
+- Connect to localhost:34197 (default) or your configured address in Docker.
+
+
+
+
+
+
+API Key Configuration
+FLE supports multiple LLM providers for agent evaluation. To get started with API keys:
+
+Quick Setup (Recommended):
+.. code-block:: bash
+
+python fle/eval/infra/setup_api_keys.py
+
+This interactive script helps you:
+- Configure API keys for OpenAI, Anthropic, and other providers
+- Set up API key rotation for high-volume experiments
+- Generate provider-specific configuration files
+- Validate your API key setup
+
+Manual Setup :
+Add your API keys to the .env file:
+.. code-block:: bash
+
+# OpenAI
+OPENAI_API_KEY=sk-…
+
# Anthropic
+ANTHROPIC_API_KEY=sk-ant-…
+
# Additional providers as needed
+
+
+Advanced Configuration :
+For large-scale experiments, you can set up API key rotation and provider-specific settings using the configuration files generated by setup_api_keys.py .
+
+
+
+Troubleshooting
+
+“No valid programs found for version X” : This is normal during initialization. The system will start generating programs shortly.
+Database connection errors : Verify your database configuration in the .env file and ensure the database exists.
+API key errors : Run python fle/eval/infra/setup_api_keys.py to verify your API key configuration.
+Docker issues : Ensure your user has permission to run Docker without sudo.
+Connection issues : Make sure the Factorio server is running and ports are properly configured.
+
+
+
+Building Documentation (Maintainers)
+cd docs/sphinx
+python3 -m sphinx -b html source build/html
+
+
+The generated site will be in factorio-learning-environment/docs/sphinx/build/html .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/getting_started/quickstart.html b/docs/sphinx/build/html/getting_started/quickstart.html
new file mode 100644
index 000000000..ee1581bc0
--- /dev/null
+++ b/docs/sphinx/build/html/getting_started/quickstart.html
@@ -0,0 +1,232 @@
+
+
+
+
+
+
+
+
+
Quickstart — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+Quickstart
+Use the CLI:
+# Start Factorio cluster
+fle cluster start
+
+# Run evaluation trajectories (requires [eval] dependencies)
+fle eval --config configs/gym_run_config.json
+
+
+
+
Note
+
When you run fle init or fle eval for the first time, an .env file and a configs/ directory with example configurations are created automatically
+
+
+Environment Overview
+FLE is an agent evaluation environment built on the game of Factorio, a popular resource management simulation game.
+Agents interact with FLE by code synthesis through a REPL (Read-Eval-Print-Loop) pattern:
+
+Observation : The agent observes the world through the output streams (stderr/stdout) of their last program.
+Action : The agent generates a Python program to perform their desired action.
+Feedback : The environment executes the program, assigns variables, add classes/functions to the namespace, and provides an output stream.
+
+
+
+Example Interaction
+# 1. Get iron patch and place mining drill
+drill = place_entity (
+ entity = Prototype . MiningDrill ,
+ position = nearest ( Resource . IronOre ),
+ direction = Direction . NORTH
+)
+# 2. Add output storage
+chest = place_entity_next_to (
+ entity = Prototype . IronChest ,
+ reference_position = drill . drop_position ,
+ direction = Direction . SOUTH
+)
+# 3. Verify automation chain and observe entities
+sleep ( 10 ) # Sleep for 10 seconds
+assert drill . status == EntityStatus . WORKING
+print ( get_entities ())
+
+
+Feedback:
+>>> [ BurnerMiningDrill ( fuel = Inventory ({ 'coal' : 4 }),
+>>> name = 'burner-mining-drill' ,
+>>> direction = Direction . DOWN ,
+>>> position = Position ( x =- 28.0 , y =- 61.0 ),
+>>> energy = 2666.6666666667 ,
+>>> tile_dimensions = TileDimensions ( tile_width = 2.0 , tile_height = 2.0 ),
+>>> status = EntityStatus . WORKING ,
+>>> neighbours = [ Entity ( name = 'iron-chest' , direction = DOWN , position = Position ( x =- 27.5 y =- 59.5 )],
+>>> drop_position = Position ( x =- 27.5 , y =- 59.5 ),
+>>> resources = [ Ingredient ( name = 'iron-ore' , count = 30000 , type = None )]),
+>>> Chest ( name = 'iron-chest' ,
+>>> direction = Direction . UP ,
+>>> position = Position ( x =- 27.5 , y =- 59.5 ),
+>>> energy = 0.0 ,
+>>> tile_dimensions = TileDimensions ( tile_width = 1.0 , tile_height = 1.0 ),
+>>> status = EntityStatus . NORMAL ,
+>>> inventory = Inventory ({ 'iron-ore' : 75 }))]
+
+
+
+
+Key Concepts
+
+Tools and Namespace Agents are provided with the Python standard library, and an API comprising tools that they can use.
+Tools are functions that perform a game action and return a typed object (e.g an Inventory), which can be stored as a named variable in the Python namespace for later use.
+The namespace acts as an episodic symbolic memory system, and saved objects represent an observation of the environment at the moment of query.
+This enables agents to maintain complex state representations and build hierarchical abstractions as the factories scale.
+
+Observation Streams Agents observe stdout and stderr - the output streams of their program. Agents may intentionally choose to print relevant objects and computations to the output stream to construct observations.
+Mistakes in the code or invalid operations raise typed exceptions with detailed context that is written to stderr.
+This enables agents to reactively debug their programs after execution, and proactively use runtime assertions during execution to self-verify their actions.
+
+Code Enhancement Agents are able to enhance their internal representation of the game state by defining:
+
+Utility functions for reuse throughout an episode, to encapsulate previously successful logic
+Classes in the namespace to better organize the data retrieved from the game.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/index.html b/docs/sphinx/build/html/index.html
new file mode 100644
index 000000000..7502789c1
--- /dev/null
+++ b/docs/sphinx/build/html/index.html
@@ -0,0 +1,343 @@
+
+
+
+
+
+
+
+
+
Welcome to Factorio Learning Environment’s documentation! — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+ Welcome to Factorio Learning Environment’s documentation!
+
+
+
+
+
+
+
+
+
+Welcome to Factorio Learning Environment’s documentation!
+An open source framework for developing and evaluating LLM agents in the game of Factorio.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/modules/env.a2a_instance.html b/docs/sphinx/build/html/modules/env.a2a_instance.html
new file mode 100644
index 000000000..074289f70
--- /dev/null
+++ b/docs/sphinx/build/html/modules/env.a2a_instance.html
@@ -0,0 +1,758 @@
+
+
+
+
+
+
+
+
+
env.a2a_instance module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/modules/env.a2a_namespace.html b/docs/sphinx/build/html/modules/env.a2a_namespace.html
new file mode 100644
index 000000000..03f41438d
--- /dev/null
+++ b/docs/sphinx/build/html/modules/env.a2a_namespace.html
@@ -0,0 +1,758 @@
+
+
+
+
+
+
+
+
+
env.a2a_namespace module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/modules/env.entities.html b/docs/sphinx/build/html/modules/env.entities.html
new file mode 100644
index 000000000..0899dbb32
--- /dev/null
+++ b/docs/sphinx/build/html/modules/env.entities.html
@@ -0,0 +1,758 @@
+
+
+
+
+
+
+
+
+
env.entities module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/modules/env.game_types.html b/docs/sphinx/build/html/modules/env.game_types.html
new file mode 100644
index 000000000..ecf18c142
--- /dev/null
+++ b/docs/sphinx/build/html/modules/env.game_types.html
@@ -0,0 +1,758 @@
+
+
+
+
+
+
+
+
+
env.game_types module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/modules/env.html b/docs/sphinx/build/html/modules/env.html
new file mode 100644
index 000000000..5bda886d5
--- /dev/null
+++ b/docs/sphinx/build/html/modules/env.html
@@ -0,0 +1,792 @@
+
+
+
+
+
+
+
+
+
env package — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/modules/env.instance.html b/docs/sphinx/build/html/modules/env.instance.html
new file mode 100644
index 000000000..5678cd760
--- /dev/null
+++ b/docs/sphinx/build/html/modules/env.instance.html
@@ -0,0 +1,758 @@
+
+
+
+
+
+
+
+
+
env.instance module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/modules/env.lua_manager.html b/docs/sphinx/build/html/modules/env.lua_manager.html
new file mode 100644
index 000000000..b1c1577b3
--- /dev/null
+++ b/docs/sphinx/build/html/modules/env.lua_manager.html
@@ -0,0 +1,758 @@
+
+
+
+
+
+
+
+
+
env.lua_manager module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/modules/env.namespace.html b/docs/sphinx/build/html/modules/env.namespace.html
new file mode 100644
index 000000000..dd9599f44
--- /dev/null
+++ b/docs/sphinx/build/html/modules/env.namespace.html
@@ -0,0 +1,758 @@
+
+
+
+
+
+
+
+
+
env.namespace module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/modules/env.tools.controller.html b/docs/sphinx/build/html/modules/env.tools.controller.html
new file mode 100644
index 000000000..c7b6b96c2
--- /dev/null
+++ b/docs/sphinx/build/html/modules/env.tools.controller.html
@@ -0,0 +1,758 @@
+
+
+
+
+
+
+
+
+
env.tools.controller module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/modules/env.tools.html b/docs/sphinx/build/html/modules/env.tools.html
new file mode 100644
index 000000000..ad43b08f5
--- /dev/null
+++ b/docs/sphinx/build/html/modules/env.tools.html
@@ -0,0 +1,771 @@
+
+
+
+
+
+
+
+
+
env.tools package — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/modules/env.tools.init.html b/docs/sphinx/build/html/modules/env.tools.init.html
new file mode 100644
index 000000000..46ec2af39
--- /dev/null
+++ b/docs/sphinx/build/html/modules/env.tools.init.html
@@ -0,0 +1,758 @@
+
+
+
+
+
+
+
+
+
env.tools.init module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/modules/env.tools.tool.html b/docs/sphinx/build/html/modules/env.tools.tool.html
new file mode 100644
index 000000000..f55b3651e
--- /dev/null
+++ b/docs/sphinx/build/html/modules/env.tools.tool.html
@@ -0,0 +1,758 @@
+
+
+
+
+
+
+
+
+
env.tools.tool module — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/objects.inv b/docs/sphinx/build/html/objects.inv
new file mode 100644
index 000000000..600d167dc
Binary files /dev/null and b/docs/sphinx/build/html/objects.inv differ
diff --git a/docs/sphinx/build/html/py-modindex.html b/docs/sphinx/build/html/py-modindex.html
new file mode 100644
index 000000000..3fcddb122
--- /dev/null
+++ b/docs/sphinx/build/html/py-modindex.html
@@ -0,0 +1,197 @@
+
+
+
+
+
+
+
+
Python Module Index — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+ Python Module Index
+
+
+
+
+
+
+
+
+
+
Python Module Index
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/search.html b/docs/sphinx/build/html/search.html
new file mode 100644
index 000000000..d2187eaa4
--- /dev/null
+++ b/docs/sphinx/build/html/search.html
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
Search — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+
+
+ Please activate JavaScript to enable the search functionality.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/searchindex.js b/docs/sphinx/build/html/searchindex.js
new file mode 100644
index 000000000..37e6da5d5
--- /dev/null
+++ b/docs/sphinx/build/html/searchindex.js
@@ -0,0 +1 @@
+Search.setIndex({"alltitles": {"API Key Configuration": [[23, "api-key-configuration"]], "API Modules": [[2, null]], "API Reference": [[25, null]], "Action Components": [[0, "action-components"]], "Action Space": [[0, null]], "Action Space Definition": [[0, "action-space-definition"]], "Action Structure": [[0, "action-structure"]], "Action Validation": [[0, "action-validation"]], "Advanced Agent Features": [[15, "advanced-agent-features"]], "Advanced Configuration": [[22, "advanced-configuration"]], "Advanced Features": [[17, "advanced-features"], [18, "advanced-features"]], "Agent Architecture": [[15, "agent-architecture"], [20, "agent-architecture"]], "Agent Behavior": [[19, "agent-behavior"]], "Agent Configuration": [[15, "agent-configuration"], [19, "agent-configuration"], [21, "agent-configuration"]], "Agent Implementation": [[15, "agent-implementation"], [19, "agent-implementation"], [21, "agent-implementation"]], "Agent Overview": [[19, "agent-overview"], [21, "agent-overview"]], "Agent Registration": [[15, "agent-registration"]], "Agent Testing": [[15, "agent-testing"]], "Agent Types": [[15, "agent-types"]], "Agents": [[2, "agents"]], "Available Environments": [[1, "available-environments"]], "Backup and Recovery": [[16, "backup-and-recovery"]], "Base Agent Class": [[15, "base-agent-class"]], "Basic Agent Example": [[19, null]], "Best Practices": [[0, "best-practices"], [15, "best-practices"], [16, "best-practices"], [17, "best-practices"], [18, "best-practices"], [19, "best-practices"], [20, "best-practices"], [21, "best-practices"], [26, "best-practices"], [27, "best-practices"], [28, "best-practices"], [29, "best-practices"], [30, "best-practices"]], "Building Documentation (Maintainers)": [[23, "building-documentation-maintainers"]], "Client-side Setup (Optional)": [[23, "client-side-setup-optional"]], "Cluster Management": [[22, "cluster-management"]], "Cluster Setup": [[22, null]], "Code Execution": [[0, "code-execution"]], "Common Models": [[2, "common-models"]], "Configuration": [[22, "configuration"]], "Connection Management": [[14, "connection-management"], [27, "connection-management"]], "Core Concepts": [[1, "core-concepts"]], "Core Environment": [[2, "core-environment"]], "Core Tools": [[14, "core-tools"], [27, "core-tools"]], "Crafting and Research": [[14, "crafting-and-research"], [27, "crafting-and-research"]], "Creating Custom Tasks": [[17, null]], "Creating Custom Tools": [[14, "creating-custom-tools"], [18, null]], "Customization": [[25, null]], "Database Client": [[16, "database-client"]], "Database Configuration": [[16, null]], "Database Migration": [[16, "database-migration"]], "Database Schema": [[16, "database-schema"]], "Database Types": [[16, "database-types"]], "Debugging and Output": [[14, "debugging-and-output"], [27, "debugging-and-output"]], "Entity Information": [[13, "entity-information"]], "Entity Management": [[14, "entity-management"], [27, "entity-management"]], "Entity Queries": [[14, "entity-queries"], [27, "entity-queries"]], "Entity Types": [[13, "entity-types"]], "Environment API": [[1, null]], "Environment Overview": [[24, "environment-overview"]], "Environment Registry": [[1, "environment-registry"]], "Error Handling": [[0, "error-handling"], [1, "error-handling"]], "Evaluation": [[2, "evaluation"]], "Example Actions": [[0, "example-actions"]], "Example Agent: Resource Collector": [[15, "example-agent-resource-collector"]], "Example Backup": [[16, "example-backup"]], "Example Configuration": [[15, "example-configuration"]], "Example Error Handling": [[0, "example-error-handling"]], "Example Interaction": [[24, "example-interaction"]], "Example Metrics": [[19, "example-metrics"], [20, "example-metrics"], [21, "example-metrics"]], "Example Migration": [[16, "example-migration"]], "Example Monitoring": [[16, "example-monitoring"]], "Example Observation": [[13, "example-observation"]], "Example Optimization": [[16, "example-optimization"]], "Example Output": [[19, "example-output"]], "Example Registration": [[15, "example-registration"]], "Example Task": [[17, "example-task"]], "Example Tool: Resource Scanner": [[18, "example-tool-resource-scanner"]], "Example Usage": [[1, "example-usage"], [16, "example-usage"]], "Example Visual Analysis": [[21, "example-visual-analysis"]], "Examples": [[25, null], [26, "examples"], [28, "examples"], [29, "examples"], [30, "examples"]], "FactorioInstance": [[1, "factorioinstance"]], "Failure Modes": [[26, "failure-modes"], [28, "failure-modes"], [29, "failure-modes"], [30, "failure-modes"]], "Game State Information": [[13, "game-state-information"]], "Getting Started": [[25, null]], "Gym Environment": [[1, "gym-environment"]], "Implementing Custom Agents": [[15, null]], "Indices and tables": [[25, "indices-and-tables"]], "Installation": [[23, null], [23, "id1"]], "Inventory Management": [[13, "inventory-management"], [14, "inventory-management"], [27, "inventory-management"]], "Key Concepts": [[24, "key-concepts"]], "Key Methods": [[1, "key-methods"], [15, "key-methods"], [16, "key-methods"]], "Monitoring and Maintenance": [[16, "monitoring-and-maintenance"]], "Movement and Control": [[14, "movement-and-control"], [27, "movement-and-control"]], "Multi-Agent Actions": [[0, "multi-agent-actions"]], "Multi-Agent Configuration": [[20, "multi-agent-configuration"]], "Multi-Agent Example": [[20, null]], "Multi-Agent Implementation": [[20, "multi-agent-implementation"]], "Multi-Agent Overview": [[20, "multi-agent-overview"]], "Namespace Management": [[1, "namespace-management"]], "Next Steps": [[24, "next-steps"]], "Observation Space": [[13, null]], "Observation Structure": [[13, "observation-structure"]], "Overview": [[26, "overview"], [28, "overview"], [29, "overview"], [30, "overview"]], "Parameters": [[26, "parameters"], [28, "parameters"], [29, "parameters"], [30, "parameters"]], "Performance Metrics": [[19, "performance-metrics"], [20, "performance-metrics"], [21, "performance-metrics"]], "Performance Optimization": [[16, "performance-optimization"]], "Position and Direction": [[13, "position-and-direction"]], "PostgreSQL Configuration": [[16, "postgresql-configuration"]], "Prerequisites": [[23, "prerequisites"]], "Quickstart": [[24, null]], "Related Tools": [[26, "related-tools"], [28, "related-tools"], [29, "related-tools"], [30, "related-tools"]], "Research System": [[13, "research-system"]], "Resource Management": [[14, "resource-management"], [27, "resource-management"]], "Returns": [[26, "returns"], [28, "returns"], [29, "returns"], [30, "returns"]], "Running Multi-Agent Systems": [[20, "running-multi-agent-systems"]], "Running the Agent": [[19, "running-the-agent"]], "Running the Visual Agent": [[21, "running-the-visual-agent"]], "SQLite Configuration": [[16, "sqlite-configuration"]], "Scenarios": [[22, "scenarios"]], "Specialized Agents": [[20, "specialized-agents"]], "Starting a Cluster": [[22, "starting-a-cluster"]], "Task Configuration": [[17, "task-configuration"]], "Task Definition": [[17, "task-definition"]], "Task Implementation": [[17, "task-implementation"]], "Task Registration": [[17, "task-registration"]], "Task Structure": [[17, "task-structure"]], "Task Types": [[17, "task-types"]], "Task Verification": [[13, "task-verification"]], "Testing Tasks": [[17, "testing-tasks"]], "Testing Tools": [[18, "testing-tools"]], "Tool Architecture": [[14, "tool-architecture"], [18, "tool-architecture"]], "Tool Categories": [[14, "tool-categories"], [27, "tool-categories"]], "Tool Development": [[27, "tool-development"]], "Tool Development Process": [[18, "tool-development-process"]], "Tool Documentation": [[14, "tool-documentation"]], "Tool Registration": [[18, "tool-registration"]], "Tool Structure": [[18, "tool-structure"]], "Tool Usage Patterns": [[27, "tool-usage-patterns"]], "Tools": [[25, null]], "Tools API": [[14, null]], "Tools Documentation": [[27, null]], "Troubleshooting": [[16, "troubleshooting"], [19, "troubleshooting"], [20, "troubleshooting"], [21, "troubleshooting"], [22, "troubleshooting"], [23, "troubleshooting"]], "Visual Agent Example": [[21, null]], "Visual Processing Features": [[21, "visual-processing-features"]], "Welcome to Factorio Learning Environment\u2019s documentation!": [[25, null]], "extract_item": [[26, null]], "fle.agents.agent_abc module": [[3, null]], "fle.agents.models module": [[4, null]], "fle.commons.models module": [[5, null]], "fle.env.entities module": [[6, null]], "fle.env.game_types module": [[7, null]], "fle.env.gym_env module": [[8, null]], "fle.env.instance module": [[9, null]], "fle.env.namespace module": [[10, null]], "fle.eval.algorithms module": [[11, null]], "fle.eval.tasks module": [[12, null]], "insert_item": [[28, null]], "inspect_inventory": [[29, null]], "place_entity": [[30, null]]}, "docnames": ["api/action", "api/environment", "api/modules", "api/modules/fle.agents.agent_abc", "api/modules/fle.agents.models", "api/modules/fle.commons.models", "api/modules/fle.env.entities", "api/modules/fle.env.game_types", "api/modules/fle.env.gym_env", "api/modules/fle.env.instance", "api/modules/fle.env.namespace", "api/modules/fle.eval.algorithms", "api/modules/fle.eval.tasks", "api/observation", "api/tools", "customization/agents", "customization/database", "customization/tasks", "customization/tools", "examples/basic_agent", "examples/multiagent", "examples/visual_agent", "getting_started/cluster", "getting_started/installation", "getting_started/quickstart", "index", "tools/extract_item", "tools/index", "tools/insert_item", "tools/inspect_inventory", "tools/place_entity"], "envversion": {"sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.viewcode": 1}, "filenames": ["api/action.rst", "api/environment.rst", "api/modules.rst", "api/modules/fle.agents.agent_abc.rst", "api/modules/fle.agents.models.rst", "api/modules/fle.commons.models.rst", "api/modules/fle.env.entities.rst", "api/modules/fle.env.game_types.rst", "api/modules/fle.env.gym_env.rst", "api/modules/fle.env.instance.rst", "api/modules/fle.env.namespace.rst", "api/modules/fle.eval.algorithms.rst", "api/modules/fle.eval.tasks.rst", "api/observation.rst", "api/tools.rst", "customization/agents.rst", "customization/database.rst", "customization/tasks.rst", "customization/tools.rst", "examples/basic_agent.rst", "examples/multiagent.rst", "examples/visual_agent.rst", "getting_started/cluster.rst", "getting_started/installation.rst", "getting_started/quickstart.rst", "index.rst", "tools/extract_item.rst", "tools/index.rst", "tools/insert_item.rst", "tools/inspect_inventory.rst", "tools/place_entity.rst"], "indexentries": {"__call__() (fle.commons.models.serializablefunction method)": [[5, "fle.commons.models.SerializableFunction.__call__", false]], "__getstate__() (fle.commons.models.serializablefunction method)": [[5, "fle.commons.models.SerializableFunction.__getstate__", false]], "__init__() (fle.agents.agent_abc.agentabc method)": [[3, "fle.agents.agent_abc.AgentABC.__init__", false]], "__init__() (fle.commons.models.gamestate method)": [[5, "fle.commons.models.GameState.__init__", false]], "__init__() (fle.commons.models.productionflows method)": [[5, "fle.commons.models.ProductionFlows.__init__", false]], "__init__() (fle.commons.models.profitconfig method)": [[5, "fle.commons.models.ProfitConfig.__init__", false]], "__init__() (fle.commons.models.researchstate method)": [[5, "fle.commons.models.ResearchState.__init__", false]], "__init__() (fle.commons.models.serializablefunction method)": [[5, "fle.commons.models.SerializableFunction.__init__", false]], "__init__() (fle.commons.models.technologystate method)": [[5, "fle.commons.models.TechnologyState.__init__", false]], "__init__() (fle.env.entities.indexedposition method)": [[6, "fle.env.entities.IndexedPosition.__init__", false]], "__init__() (fle.env.entities.position method)": [[6, "fle.env.entities.Position.__init__", false]], "__init__() (fle.env.game_types.prototype method)": [[7, "fle.env.game_types.Prototype.__init__", false]], "__init__() (fle.env.gym_env.action.action method)": [[0, "fle.env.gym_env.action.Action.__init__", false]], "__init__() (fle.env.instance.factorioinstance method)": [[1, "fle.env.instance.FactorioInstance.__init__", false], [9, "fle.env.instance.FactorioInstance.__init__", false]], "__init__() (fle.env.instance.gamecontrol method)": [[9, "fle.env.instance.GameControl.__init__", false]], "__init__() (fle.env.namespace.factorionamespace method)": [[10, "fle.env.namespace.FactorioNamespace.__init__", false]], "__init__() (fle.env.namespace.loopcontext method)": [[10, "fle.env.namespace.LoopContext.__init__", false]], "__init__() (fle.eval.tasks.defaulttask method)": [[12, "fle.eval.tasks.DefaultTask.__init__", false]], "__init__() (fle.eval.tasks.taskabc method)": [[12, "fle.eval.tasks.TaskABC.__init__", false]], "__init__() (fle.eval.tasks.taskfactory method)": [[12, "fle.eval.tasks.TaskFactory.__init__", false]], "__init__() (fle.eval.tasks.throughputtask method)": [[12, "fle.eval.tasks.ThroughputTask.__init__", false]], "__init__() (fle.eval.tasks.unboundedthroughputtask method)": [[12, "fle.eval.tasks.UnboundedThroughputTask.__init__", false]], "__setstate__() (fle.commons.models.serializablefunction method)": [[5, "fle.commons.models.SerializableFunction.__setstate__", false]], "__str__() (fle.commons.models.serializablefunction method)": [[5, "fle.commons.models.SerializableFunction.__str__", false]], "above() (fle.env.entities.position method)": [[6, "fle.env.entities.Position.above", false]], "accumulator (class in fle.env.entities)": [[6, "fle.env.entities.Accumulator", false]], "accumulator (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Accumulator", false]], "achievements (fle.agents.models.response attribute)": [[4, "fle.agents.models.Response.achievements", false]], "achievements (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.achievements", false]], "action (class in fle.env.gym_env.action)": [[0, "fle.env.gym_env.action.Action", false]], "add_agent_message() (fle.commons.models.conversation method)": [[5, "fle.commons.models.Conversation.add_agent_message", false]], "add_result() (fle.commons.models.conversation method)": [[5, "fle.commons.models.Conversation.add_result", false]], "add_user_message() (fle.commons.models.conversation method)": [[5, "fle.commons.models.Conversation.add_user_message", false]], "advancedassemblingmachine (class in fle.env.entities)": [[6, "fle.env.entities.AdvancedAssemblingMachine", false]], "advancedcircuit (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.AdvancedCircuit", false]], "advancedelectronics (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.AdvancedElectronics", false]], "advancedelectronics2 (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.AdvancedElectronics2", false]], "advancedmaterialprocessing (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.AdvancedMaterialProcessing", false]], "advancedmaterialprocessing2 (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.AdvancedMaterialProcessing2", false]], "advancedoilprocessing (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.AdvancedOilProcessing", false]], "advancedoilprocessing (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.AdvancedOilProcessing", false]], "advancedoilprocessing (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.AdvancedOilProcessing", false]], "advantage (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.advantage", false]], "agent_idx (fle.env.gym_env.action.action attribute)": [[0, "fle.env.gym_env.action.Action.agent_idx", false]], "agent_messages (fle.commons.models.gamestate attribute)": [[5, "fle.commons.models.GameState.agent_messages", false]], "agentabc (class in fle.agents.agent_abc)": [[3, "fle.agents.agent_abc.AgentABC", false]], "all (fle.env.entities.layer attribute)": [[6, "fle.env.entities.Layer.ALL", false]], "ammo (class in fle.env.entities)": [[6, "fle.env.entities.Ammo", false]], "assembling_machine_input (fle.env.entities.assemblingmachine attribute)": [[6, "fle.env.entities.AssemblingMachine.assembling_machine_input", false]], "assembling_machine_modules (fle.env.entities.assemblingmachine attribute)": [[6, "fle.env.entities.AssemblingMachine.assembling_machine_modules", false]], "assembling_machine_output (fle.env.entities.assemblingmachine attribute)": [[6, "fle.env.entities.AssemblingMachine.assembling_machine_output", false]], "assemblingmachine (class in fle.env.entities)": [[6, "fle.env.entities.AssemblingMachine", false]], "assemblingmachine1 (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.AssemblingMachine1", false]], "assemblingmachine2 (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.AssemblingMachine2", false]], "assemblingmachine3 (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.AssemblingMachine3", false]], "automation (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.Automation", false]], "automation2 (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.Automation2", false]], "automation3 (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.Automation3", false]], "automationsciencepack (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.AutomationSciencePack", false]], "barrelfilling (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.BarrelFilling", false]], "basicoilprocessing (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.BasicOilProcessing", false]], "battery (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Battery", false]], "batterytechnology (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.BatteryTechnology", false]], "below() (fle.env.entities.position method)": [[6, "fle.env.entities.Position.below", false]], "beltgroup (class in fle.env.entities)": [[6, "fle.env.entities.BeltGroup", false]], "beltgroup (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.BeltGroup", false]], "belts (fle.env.entities.beltgroup attribute)": [[6, "fle.env.entities.BeltGroup.belts", false]], "bigelectricpole (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.BigElectricPole", false]], "bind() (fle.commons.models.serializablefunction method)": [[5, "fle.commons.models.SerializableFunction.bind", false]], "boiler (class in fle.env.entities)": [[6, "fle.env.entities.Boiler", false]], "boiler (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Boiler", false]], "bounding_box (fle.env.entities.resourcepatch attribute)": [[6, "fle.env.entities.ResourcePatch.bounding_box", false]], "boundingbox (class in fle.env.entities)": [[6, "fle.env.entities.BoundingBox", false]], "buffer_capacity (fle.env.entities.energysource attribute)": [[6, "fle.env.entities.EnergySource.buffer_capacity", false]], "buildingbox (class in fle.env.entities)": [[6, "fle.env.entities.BuildingBox", false]], "burnerinserter (class in fle.env.entities)": [[6, "fle.env.entities.BurnerInserter", false]], "burnerinserter (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.BurnerInserter", false]], "burnerminingdrill (class in fle.env.entities)": [[6, "fle.env.entities.BurnerMiningDrill", false]], "burnerminingdrill (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.BurnerMiningDrill", false]], "burnertype (class in fle.env.entities)": [[6, "fle.env.entities.BurnerType", false]], "category (fle.env.entities.recipe attribute)": [[6, "fle.env.entities.Recipe.category", false]], "center (fle.env.entities.boundingbox property)": [[6, "fle.env.entities.BoundingBox.center", false]], "centrifuge (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Centrifuge", false]], "characterinventoryslots (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.CharacterInventorySlots", false]], "charging (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.CHARGING", false]], "check_step_completion() (fle.agents.agent_abc.agentabc method)": [[3, "fle.agents.agent_abc.AgentABC.check_step_completion", false]], "chemicalplant (class in fle.env.entities)": [[6, "fle.env.entities.ChemicalPlant", false]], "chemicalplant (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ChemicalPlant", false]], "chemicalsciencepack (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ChemicalSciencePack", false]], "chemicalsciencepack (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.ChemicalSciencePack", false]], "chest (class in fle.env.entities)": [[6, "fle.env.entities.Chest", false]], "children (fle.commons.models.timingmetrics attribute)": [[5, "fle.commons.models.TimingMetrics.children", false]], "cleanup() (fle.env.instance.factorioinstance method)": [[1, "fle.env.instance.FactorioInstance.cleanup", false], [9, "fle.env.instance.FactorioInstance.cleanup", false]], "coal (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Coal", false]], "coal (fle.env.game_types.resource attribute)": [[7, "fle.env.game_types.Resource.Coal", false]], "coal (fle.env.game_types.resourcename attribute)": [[7, "fle.env.game_types.ResourceName.Coal", false]], "coalliquefaction (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.CoalLiquefaction", false]], "coalliquifaction (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.CoalLiquifaction", false]], "code (fle.agents.models.response attribute)": [[4, "fle.agents.models.Response.code", false]], "code (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.code", false]], "code (fle.env.gym_env.action.action attribute)": [[0, "fle.env.gym_env.action.Action.code", false]], "completion_token_usage (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.completion_token_usage", false]], "completionreason (class in fle.agents.models)": [[4, "fle.agents.models.CompletionReason", false]], "completionresult (class in fle.agents.models)": [[4, "fle.agents.models.CompletionResult", false]], "concrete (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Concrete", false]], "connect_to_server() (fle.env.instance.factorioinstance static method)": [[1, "fle.env.instance.FactorioInstance.connect_to_server", false], [9, "fle.env.instance.FactorioInstance.connect_to_server", false]], "connected_to (fle.env.entities.undergroundbelt attribute)": [[6, "fle.env.entities.UndergroundBelt.connected_to", false]], "connection_points (fle.env.entities.fluidhandler attribute)": [[6, "fle.env.entities.FluidHandler.connection_points", false]], "connections (fle.env.entities.layer attribute)": [[6, "fle.env.entities.Layer.CONNECTIONS", false]], "content (fle.commons.models.message attribute)": [[5, "fle.commons.models.Message.content", false]], "contents (fle.env.entities.entityinfo attribute)": [[6, "fle.env.entities.EntityInfo.contents", false]], "contents (fle.env.entities.pipe attribute)": [[6, "fle.env.entities.Pipe.contents", false]], "conversation (class in fle.commons.models)": [[5, "fle.commons.models.Conversation", false]], "conversation (fle.agents.agent_abc.agentabc attribute)": [[3, "fle.agents.agent_abc.AgentABC.conversation", false]], "conversation (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.conversation", false]], "coppercable (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.CopperCable", false]], "copperore (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.CopperOre", false]], "copperore (fle.env.game_types.resource attribute)": [[7, "fle.env.game_types.Resource.CopperOre", false]], "copperore (fle.env.game_types.resourcename attribute)": [[7, "fle.env.game_types.ResourceName.CopperOre", false]], "copperplate (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.CopperPlate", false]], "count (fle.env.entities.ingredient attribute)": [[6, "fle.env.entities.Ingredient.count", false]], "crafted (fle.commons.models.productionflows attribute)": [[5, "fle.commons.models.ProductionFlows.crafted", false]], "create_default_agent_card() (in module fle.agents.agent_abc)": [[3, "fle.agents.agent_abc.create_default_agent_card", false]], "create_task() (fle.eval.tasks.taskfactory static method)": [[12, "fle.eval.tasks.TaskFactory.create_task", false]], "created_at (fle.agents.models.response attribute)": [[4, "fle.agents.models.Response.created_at", false]], "created_at (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.created_at", false]], "crudeoil (fle.env.game_types.resource attribute)": [[7, "fle.env.game_types.Resource.CrudeOil", false]], "crudeoil (fle.env.game_types.resourcename attribute)": [[7, "fle.env.game_types.ResourceName.CrudeOil", false]], "current_research (fle.commons.models.researchstate attribute)": [[5, "fle.commons.models.ResearchState.current_research", false]], "defaulttask (class in fle.eval.tasks)": [[12, "fle.eval.tasks.DefaultTask", false]], "depth (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.depth", false]], "dimensions (class in fle.env.entities)": [[6, "fle.env.entities.Dimensions", false]], "dimensions (fle.env.entities.entity attribute)": [[6, "fle.env.entities.Entity.dimensions", false], [13, "fle.env.entities.Entity.dimensions", false]], "direction (class in fle.env.entities)": [[6, "fle.env.entities.Direction", false]], "direction (fle.env.entities.entitycore attribute)": [[6, "fle.env.entities.EntityCore.direction", false]], "direction (fle.env.entities.entityinfo attribute)": [[6, "fle.env.entities.EntityInfo.direction", false]], "directioninternal (class in fle.env.instance)": [[9, "fle.env.instance.DirectionInternal", false]], "discharging (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.DISCHARGING", false]], "distance() (fle.env.entities.position method)": [[6, "fle.env.entities.Position.distance", false]], "down (fle.env.entities.direction attribute)": [[6, "fle.env.entities.Direction.DOWN", false]], "down (fle.env.instance.directioninternal attribute)": [[9, "fle.env.instance.DirectionInternal.DOWN", false]], "down() (fle.env.entities.position method)": [[6, "fle.env.entities.Position.down", false]], "drain (fle.env.entities.energysource attribute)": [[6, "fle.env.entities.EnergySource.drain", false]], "drop_position (fle.env.entities.inserter attribute)": [[6, "fle.env.entities.Inserter.drop_position", false]], "drop_position (fle.env.entities.miningdrill attribute)": [[6, "fle.env.entities.MiningDrill.drop_position", false]], "duration (fle.commons.models.timingmetrics property)": [[5, "fle.commons.models.TimingMetrics.duration", false]], "dynamic_profit_multiplier (fle.commons.models.profitconfig attribute)": [[5, "fle.commons.models.ProfitConfig.dynamic_profit_multiplier", false]], "east (fle.env.entities.direction attribute)": [[6, "fle.env.entities.Direction.EAST", false]], "east (fle.env.instance.directioninternal attribute)": [[9, "fle.env.instance.DirectionInternal.EAST", false]], "electric (class in fle.env.entities)": [[6, "fle.env.entities.Electric", false]], "electric_output_flow_limit (fle.env.entities.electricalproducer attribute)": [[6, "fle.env.entities.ElectricalProducer.electric_output_flow_limit", false]], "electrical_id (fle.env.entities.electric attribute)": [[6, "fle.env.entities.Electric.electrical_id", false]], "electricalproducer (class in fle.env.entities)": [[6, "fle.env.entities.ElectricalProducer", false]], "electricenergy (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.ElectricEnergy", false]], "electricenergy2 (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.ElectricEnergy2", false]], "electricengineering (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.ElectricEngineering", false]], "electricengineunit (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ElectricEngineUnit", false]], "electricfurnace (class in fle.env.entities)": [[6, "fle.env.entities.ElectricFurnace", false]], "electricfurnace (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ElectricFurnace", false]], "electricity (fle.env.entities.layer attribute)": [[6, "fle.env.entities.Layer.ELECTRICITY", false]], "electricitygroup (class in fle.env.entities)": [[6, "fle.env.entities.ElectricityGroup", false]], "electricitygroup (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ElectricityGroup", false]], "electricitypole (class in fle.env.entities)": [[6, "fle.env.entities.ElectricityPole", false]], "electricminingdrill (class in fle.env.entities)": [[6, "fle.env.entities.ElectricMiningDrill", false]], "electricminingdrill (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ElectricMiningDrill", false]], "electroniccircuit (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ElectronicCircuit", false]], "electronics (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.Electronics", false]], "empty (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.EMPTY", false]], "emptybarrel (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.EmptyBarrel", false]], "emptycrudeoilbarrel (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.EmptyCrudeOilBarrel", false]], "emptyheavyoilbarrel (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.EmptyHeavyOilBarrel", false]], "emptylightoilbarrel (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.EmptyLightOilBarrel", false]], "emptylubricantbarrel (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.EmptyLubricantBarrel", false]], "emptypetroleumgasbarrel (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.EmptyPetroleumGasBarrel", false]], "emptysulfuricacidbarrel (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.EmptySulfuricAcidBarrel", false]], "emptywaterbarrel (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.EmptyWaterBarrel", false]], "enabled (fle.commons.models.technologystate attribute)": [[5, "fle.commons.models.TechnologyState.enabled", false]], "enabled (fle.env.entities.recipe attribute)": [[6, "fle.env.entities.Recipe.enabled", false]], "end() (fle.agents.agent_abc.agentabc method)": [[3, "fle.agents.agent_abc.AgentABC.end", false]], "end_position (fle.env.entities.entityinfo attribute)": [[6, "fle.env.entities.EntityInfo.end_position", false]], "end_time (fle.commons.models.timingmetrics attribute)": [[5, "fle.commons.models.TimingMetrics.end_time", false]], "energy (fle.env.entities.entity attribute)": [[6, "fle.env.entities.Entity.energy", false], [13, "fle.env.entities.Entity.energy", false]], "energy (fle.env.entities.recipe attribute)": [[6, "fle.env.entities.Recipe.energy", false]], "energy_source (fle.env.entities.accumulator attribute)": [[6, "fle.env.entities.Accumulator.energy_source", false]], "energy_source (fle.env.entities.electricalproducer attribute)": [[6, "fle.env.entities.ElectricalProducer.energy_source", false]], "energyshield (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.EnergyShield", false]], "energyshield2 (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.EnergyShield2", false]], "energysource (class in fle.env.entities)": [[6, "fle.env.entities.EnergySource", false]], "engineunit (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.EngineUnit", false]], "enhance_response_with_task_output() (fle.eval.tasks.taskabc method)": [[12, "fle.eval.tasks.TaskABC.enhance_response_with_task_output", false]], "enhance_response_with_task_output() (fle.eval.tasks.throughputtask method)": [[12, "fle.eval.tasks.ThroughputTask.enhance_response_with_task_output", false]], "enhance_response_with_task_output() (fle.eval.tasks.unboundedthroughputtask method)": [[12, "fle.eval.tasks.UnboundedThroughputTask.enhance_response_with_task_output", false]], "enter_loop() (fle.env.namespace.loopcontext method)": [[10, "fle.env.namespace.LoopContext.enter_loop", false]], "entities (fle.commons.models.gamestate attribute)": [[5, "fle.commons.models.GameState.entities", false]], "entities (fle.env.entities.inspectionresults attribute)": [[6, "fle.env.entities.InspectionResults.entities", false]], "entities (fle.env.entities.layer attribute)": [[6, "fle.env.entities.Layer.ENTITIES", false]], "entities (fle.env.entities.wallgroup attribute)": [[6, "fle.env.entities.WallGroup.entities", false]], "entity (class in fle.env.entities)": [[6, "fle.env.entities.Entity", false], [13, "fle.env.entities.Entity", false]], "entitycore (class in fle.env.entities)": [[6, "fle.env.entities.EntityCore", false]], "entitygroup (class in fle.env.entities)": [[6, "fle.env.entities.EntityGroup", false]], "entityinfo (class in fle.env.entities)": [[6, "fle.env.entities.EntityInfo", false]], "entitystatus (class in fle.env.entities)": [[6, "fle.env.entities.EntityStatus", false]], "error (fle.agents.models.response attribute)": [[4, "fle.agents.models.Response.error", false]], "eval() (fle.env.instance.factorioinstance method)": [[1, "fle.env.instance.FactorioInstance.eval", false], [9, "fle.env.instance.FactorioInstance.eval", false]], "eval_with_error() (fle.env.instance.factorioinstance method)": [[1, "fle.env.instance.FactorioInstance.eval_with_error", false], [9, "fle.env.instance.FactorioInstance.eval_with_error", false]], "eval_with_timeout() (fle.env.namespace.factorionamespace method)": [[10, "fle.env.namespace.FactorioNamespace.eval_with_timeout", false]], "execute_body() (fle.env.namespace.factorionamespace method)": [[10, "fle.env.namespace.FactorioNamespace.execute_body", false]], "execute_node() (fle.env.namespace.factorionamespace method)": [[10, "fle.env.namespace.FactorioNamespace.execute_node", false]], "exit_loop() (fle.env.namespace.loopcontext method)": [[10, "fle.env.namespace.LoopContext.exit_loop", false]], "expressinserter (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ExpressInserter", false]], "expresssplitter (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ExpressSplitter", false]], "expresstransportbelt (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ExpressTransportBelt", false]], "expressundergroundbelt (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ExpressUndergroundBelt", false]], "factorioinstance (class in fle.env.instance)": [[1, "fle.env.instance.FactorioInstance", false], [9, "fle.env.instance.FactorioInstance", false]], "factorionamespace (class in fle.env.namespace)": [[10, "fle.env.namespace.FactorioNamespace", false]], "fastinserter (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.FastInserter", false]], "fastinserter (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.FastInserter", false]], "fastsplitter (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.FastSplitter", false]], "fasttransportbelt (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.FastTransportBelt", false]], "fastundergroundbelt (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.FastUndergroundBelt", false]], "fillcrudeoilbarrel (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.FillCrudeOilBarrel", false]], "fillheavyoilbarrel (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.FillHeavyOilBarrel", false]], "filllightoilbarrel (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.FillLightOilBarrel", false]], "filllubricantbarrel (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.FillLubricantBarrel", false]], "fillpetroleumgasbarrel (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.FillPetroleumGasBarrel", false]], "fillsulfuricacidbarrel (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.FillSulfuricAcidBarrel", false]], "fillwaterbarrel (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.FillWaterBarrel", false]], "filter (fle.env.entities.filtered attribute)": [[6, "fle.env.entities.Filtered.filter", false]], "filter_serializable_vars() (in module fle.commons.models)": [[5, "fle.commons.models.filter_serializable_vars", false]], "filtered (class in fle.env.entities)": [[6, "fle.env.entities.Filtered", false]], "filterinserter (class in fle.env.entities)": [[6, "fle.env.entities.FilterInserter", false]], "filterinserter (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.FilterInserter", false]], "firearmmagazine (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.FirearmMagazine", false]], "first_namespace (fle.env.instance.factorioinstance property)": [[1, "fle.env.instance.FactorioInstance.first_namespace", false], [9, "fle.env.instance.FactorioInstance.first_namespace", false]], "fle.agents.agent_abc": [[3, "module-fle.agents.agent_abc", false]], "fle.agents.models": [[4, "module-fle.agents.models", false]], "fle.commons.models": [[5, "module-fle.commons.models", false]], "fle.env.entities": [[6, "module-fle.env.entities", false]], "fle.env.game_types": [[7, "module-fle.env.game_types", false]], "fle.env.gym_env": [[8, "module-fle.env.gym_env", false]], "fle.env.instance": [[9, "module-fle.env.instance", false]], "fle.env.namespace": [[10, "module-fle.env.namespace", false]], "fle.eval.algorithms": [[11, "module-fle.eval.algorithms", false]], "fle.eval.tasks": [[12, "module-fle.eval.tasks", false]], "flow_rate (fle.env.entities.electricitypole attribute)": [[6, "fle.env.entities.ElectricityPole.flow_rate", false]], "flow_rate (fle.env.entities.pipe attribute)": [[6, "fle.env.entities.Pipe.flow_rate", false]], "flows (fle.agents.models.response attribute)": [[4, "fle.agents.models.Response.flows", false]], "flows (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.flows", false]], "fluid (fle.env.entities.pipe attribute)": [[6, "fle.env.entities.Pipe.fluid", false]], "fluid_box (fle.env.entities.fluidhandler attribute)": [[6, "fle.env.entities.FluidHandler.fluid_box", false]], "fluid_box (fle.env.entities.multifluidhandler attribute)": [[6, "fle.env.entities.MultiFluidHandler.fluid_box", false]], "fluid_ingredient_shortage (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.FLUID_INGREDIENT_SHORTAGE", false]], "fluid_systems (fle.env.entities.fluidhandler attribute)": [[6, "fle.env.entities.FluidHandler.fluid_systems", false]], "fluid_systems (fle.env.entities.multifluidhandler attribute)": [[6, "fle.env.entities.MultiFluidHandler.fluid_systems", false]], "fluidbox_id (fle.env.entities.pipe attribute)": [[6, "fle.env.entities.Pipe.fluidbox_id", false]], "fluidhandler (class in fle.env.entities)": [[6, "fle.env.entities.FluidHandler", false]], "flyingrobotframe (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.FlyingRobotFrame", false]], "frequency_penalty (fle.commons.models.generationparameters attribute)": [[5, "fle.commons.models.GenerationParameters.frequency_penalty", false]], "from_dict() (fle.commons.models.productionflows class method)": [[5, "fle.commons.models.ProductionFlows.from_dict", false]], "from_factorio_direction() (fle.env.instance.directioninternal class method)": [[9, "fle.env.instance.DirectionInternal.from_factorio_direction", false]], "from_instance() (fle.commons.models.gamestate class method)": [[5, "fle.commons.models.GameState.from_instance", false]], "from_int() (fle.env.entities.entitystatus class method)": [[6, "fle.env.entities.EntityStatus.from_int", false]], "from_row() (fle.commons.models.program class method)": [[5, "fle.commons.models.Program.from_row", false]], "from_string() (fle.env.entities.direction class method)": [[6, "fle.env.entities.Direction.from_string", false]], "from_string() (fle.env.entities.entitystatus class method)": [[6, "fle.env.entities.EntityStatus.from_string", false]], "fuel (fle.env.entities.burnertype attribute)": [[6, "fle.env.entities.BurnerType.fuel", false]], "full_burnt_result_output (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.FULL_BURNT_RESULT_OUTPUT", false]], "full_output (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.FULL_OUTPUT", false]], "fully_charged (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.FULLY_CHARGED", false]], "furnace (class in fle.env.entities)": [[6, "fle.env.entities.Furnace", false]], "furnace_result (fle.env.entities.electricfurnace attribute)": [[6, "fle.env.entities.ElectricFurnace.furnace_result", false]], "furnace_result (fle.env.entities.furnace attribute)": [[6, "fle.env.entities.Furnace.furnace_result", false]], "furnace_source (fle.env.entities.electricfurnace attribute)": [[6, "fle.env.entities.ElectricFurnace.furnace_source", false]], "furnace_source (fle.env.entities.furnace attribute)": [[6, "fle.env.entities.Furnace.furnace_source", false]], "game_state (fle.env.gym_env.action.action attribute)": [[0, "fle.env.gym_env.action.Action.game_state", false]], "gamecontrol (class in fle.env.instance)": [[9, "fle.env.instance.GameControl", false]], "gamestate (class in fle.commons.models)": [[5, "fle.commons.models.GameState", false]], "gate (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Gate", false]], "generationparameters (class in fle.commons.models)": [[5, "fle.commons.models.GenerationParameters", false]], "generator (class in fle.env.entities)": [[6, "fle.env.entities.Generator", false]], "get() (fle.env.entities.inventory method)": [[6, "fle.env.entities.Inventory.get", false]], "get_agent_card() (fle.agents.agent_abc.agentabc method)": [[3, "fle.agents.agent_abc.AgentABC.get_agent_card", false]], "get_agent_instructions() (fle.eval.tasks.taskabc method)": [[12, "fle.eval.tasks.TaskABC.get_agent_instructions", false]], "get_elapsed_ticks() (fle.env.instance.factorioinstance method)": [[1, "fle.env.instance.FactorioInstance.get_elapsed_ticks", false], [9, "fle.env.instance.FactorioInstance.get_elapsed_ticks", false]], "get_elapsed_ticks() (fle.env.instance.gamecontrol method)": [[9, "fle.env.instance.GameControl.get_elapsed_ticks", false]], "get_entities() (fle.env.entities.inspectionresults method)": [[6, "fle.env.entities.InspectionResults.get_entities", false]], "get_entity() (fle.env.entities.inspectionresults method)": [[6, "fle.env.entities.InspectionResults.get_entity", false]], "get_environment_info() (in module fle.env.gym_env.registry)": [[1, "fle.env.gym_env.registry.get_environment_info", false]], "get_functions() (fle.env.namespace.factorionamespace method)": [[10, "fle.env.namespace.FactorioNamespace.get_functions", false]], "get_messages() (fle.env.namespace.factorionamespace method)": [[10, "fle.env.namespace.FactorioNamespace.get_messages", false]], "get_new_flows() (fle.commons.models.productionflows method)": [[5, "fle.commons.models.ProductionFlows.get_new_flows", false]], "get_speed() (fle.env.instance.factorioinstance method)": [[1, "fle.env.instance.FactorioInstance.get_speed", false], [9, "fle.env.instance.FactorioInstance.get_speed", false]], "get_speed() (fle.env.instance.gamecontrol method)": [[9, "fle.env.instance.GameControl.get_speed", false]], "get_step() (fle.commons.models.program method)": [[5, "fle.commons.models.Program.get_step", false]], "get_system_prompt() (fle.env.instance.factorioinstance method)": [[1, "fle.env.instance.FactorioInstance.get_system_prompt", false], [9, "fle.env.instance.FactorioInstance.get_system_prompt", false]], "get_uct() (fle.commons.models.program method)": [[5, "fle.commons.models.Program.get_uct", false]], "get_warnings() (fle.env.instance.factorioinstance method)": [[1, "fle.env.instance.FactorioInstance.get_warnings", false], [9, "fle.env.instance.FactorioInstance.get_warnings", false]], "grenade (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Grenade", false]], "grenades (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.Grenades", false]], "grid (fle.env.entities.layer attribute)": [[6, "fle.env.entities.Layer.GRID", false]], "gunturret (class in fle.env.entities)": [[6, "fle.env.entities.GunTurret", false]], "gunturret (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.GunTurret", false]], "handle_break() (fle.env.namespace.loopcontext method)": [[10, "fle.env.namespace.LoopContext.handle_break", false]], "handle_continue() (fle.env.namespace.loopcontext method)": [[10, "fle.env.namespace.LoopContext.handle_continue", false]], "harvested (fle.commons.models.productionflows attribute)": [[5, "fle.commons.models.ProductionFlows.harvested", false]], "health (fle.env.entities.entity attribute)": [[6, "fle.env.entities.Entity.health", false], [13, "fle.env.entities.Entity.health", false]], "heatexchanger (class in fle.env.entities)": [[6, "fle.env.entities.HeatExchanger", false]], "heatexchanger (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.HeatExchanger", false]], "heatpipe (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.HeatPipe", false]], "heavyoil (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.HeavyOil", false]], "heavyoilcracking (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.HeavyOilCracking", false]], "height (fle.env.entities.buildingbox attribute)": [[6, "fle.env.entities.BuildingBox.height", false]], "height (fle.env.entities.dimensions attribute)": [[6, "fle.env.entities.Dimensions.height", false]], "height (fle.env.entities.entity property)": [[6, "fle.env.entities.Entity.height", false], [13, "fle.env.entities.Entity.height", false]], "height (fle.env.game_types.prototype property)": [[7, "fle.env.game_types.Prototype.HEIGHT", false]], "height() (fle.env.entities.boundingbox method)": [[6, "fle.env.entities.BoundingBox.height", false]], "holdout_value (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.holdout_value", false]], "id (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.id", false]], "id (fle.env.entities.entity attribute)": [[6, "fle.env.entities.Entity.id", false], [13, "fle.env.entities.Entity.id", false]], "id (fle.env.entities.entitygroup attribute)": [[6, "fle.env.entities.EntityGroup.id", false]], "indexedposition (class in fle.env.entities)": [[6, "fle.env.entities.IndexedPosition", false]], "ingredient (class in fle.env.entities)": [[6, "fle.env.entities.Ingredient", false]], "ingredients (fle.commons.models.technologystate attribute)": [[5, "fle.commons.models.TechnologyState.ingredients", false]], "ingredients (fle.env.entities.recipe attribute)": [[6, "fle.env.entities.Recipe.ingredients", false]], "initialise() (fle.env.instance.factorioinstance method)": [[1, "fle.env.instance.FactorioInstance.initialise", false], [9, "fle.env.instance.FactorioInstance.initialise", false]], "input (fle.commons.models.productionflows attribute)": [[5, "fle.commons.models.ProductionFlows.input", false]], "input_connection_points (fle.env.entities.multifluidhandler attribute)": [[6, "fle.env.entities.MultiFluidHandler.input_connection_points", false]], "input_flow_limit (fle.env.entities.energysource attribute)": [[6, "fle.env.entities.EnergySource.input_flow_limit", false]], "input_fluids (fle.env.entities.multifluidhandler attribute)": [[6, "fle.env.entities.MultiFluidHandler.input_fluids", false]], "input_position (fle.env.entities.transportbelt attribute)": [[6, "fle.env.entities.TransportBelt.input_position", false]], "input_positions (fle.env.entities.splitter attribute)": [[6, "fle.env.entities.Splitter.input_positions", false]], "inputs (fle.env.entities.beltgroup attribute)": [[6, "fle.env.entities.BeltGroup.inputs", false]], "inserter (class in fle.env.entities)": [[6, "fle.env.entities.Inserter", false]], "inserter (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Inserter", false]], "inspectionresults (class in fle.env.entities)": [[6, "fle.env.entities.InspectionResults", false]], "instance (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.instance", false]], "inventories (fle.commons.models.gamestate attribute)": [[5, "fle.commons.models.GameState.inventories", false]], "inventory (class in fle.env.entities)": [[6, "fle.env.entities.Inventory", false]], "inventory (fle.env.entities.beltgroup attribute)": [[6, "fle.env.entities.BeltGroup.inventory", false]], "inventory (fle.env.entities.chest attribute)": [[6, "fle.env.entities.Chest.inventory", false]], "inventory (fle.env.entities.splitter attribute)": [[6, "fle.env.entities.Splitter.inventory", false]], "inventory (fle.env.entities.transportbelt attribute)": [[6, "fle.env.entities.TransportBelt.inventory", false]], "ironchest (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.IronChest", false]], "irongearwheel (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.IronGearWheel", false]], "ironore (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.IronOre", false]], "ironore (fle.env.game_types.resource attribute)": [[7, "fle.env.game_types.Resource.IronOre", false]], "ironore (fle.env.game_types.resourcename attribute)": [[7, "fle.env.game_types.ResourceName.IronOre", false]], "ironplate (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.IronPlate", false]], "ironstick (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.IronStick", false]], "is_close() (fle.env.entities.position method)": [[6, "fle.env.entities.Position.is_close", false]], "is_input (fle.env.entities.undergroundbelt attribute)": [[6, "fle.env.entities.UndergroundBelt.is_input", false]], "is_multiagent (fle.commons.models.gamestate property)": [[5, "fle.commons.models.GameState.is_multiagent", false]], "is_multiagent (fle.env.instance.factorioinstance property)": [[1, "fle.env.instance.FactorioInstance.is_multiagent", false], [9, "fle.env.instance.FactorioInstance.is_multiagent", false]], "is_paused() (fle.env.instance.gamecontrol method)": [[9, "fle.env.instance.GameControl.is_paused", false]], "is_source (fle.env.entities.transportbelt attribute)": [[6, "fle.env.entities.TransportBelt.is_source", false]], "is_terminus (fle.env.entities.transportbelt attribute)": [[6, "fle.env.entities.TransportBelt.is_terminus", false]], "is_valid() (fle.commons.models.productionflows method)": [[5, "fle.commons.models.ProductionFlows.is_valid", false]], "item_ingredient_shortage (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.ITEM_INGREDIENT_SHORTAGE", false]], "items() (fle.env.entities.inventory method)": [[6, "fle.env.entities.Inventory.items", false]], "keys() (fle.env.entities.inventory method)": [[6, "fle.env.entities.Inventory.keys", false]], "kills (fle.env.entities.gunturret attribute)": [[6, "fle.env.entities.GunTurret.kills", false]], "lab (class in fle.env.entities)": [[6, "fle.env.entities.Lab", false]], "lab (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Lab", false]], "lab_input (fle.env.entities.lab attribute)": [[6, "fle.env.entities.Lab.lab_input", false]], "lab_modules (fle.env.entities.lab attribute)": [[6, "fle.env.entities.Lab.lab_modules", false]], "labels (fle.env.entities.layer attribute)": [[6, "fle.env.entities.Layer.LABELS", false]], "landfill (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.Landfill", false]], "launch_count (fle.env.entities.rocketsilo attribute)": [[6, "fle.env.entities.RocketSilo.launch_count", false]], "launch_progress (fle.env.entities.rocket attribute)": [[6, "fle.env.entities.Rocket.launch_progress", false]], "launching_rocket (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.LAUNCHING_ROCKET", false]], "layer (class in fle.env.entities)": [[6, "fle.env.entities.Layer", false]], "left (fle.env.entities.direction attribute)": [[6, "fle.env.entities.Direction.LEFT", false]], "left (fle.env.instance.directioninternal attribute)": [[9, "fle.env.instance.DirectionInternal.LEFT", false]], "left() (fle.env.entities.position method)": [[6, "fle.env.entities.Position.left", false]], "left_bottom (fle.env.entities.boundingbox attribute)": [[6, "fle.env.entities.BoundingBox.left_bottom", false]], "left_top (fle.env.entities.boundingbox attribute)": [[6, "fle.env.entities.BoundingBox.left_top", false]], "level (fle.commons.models.technologystate attribute)": [[5, "fle.commons.models.TechnologyState.level", false]], "lightoil (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.LightOil", false]], "lightoilcracking (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.LightOilCracking", false]], "list_available_environments() (in module fle.env.gym_env.registry)": [[1, "fle.env.gym_env.registry.list_available_environments", false]], "load() (fle.env.namespace.factorionamespace method)": [[10, "fle.env.namespace.FactorioNamespace.load", false]], "load_messages() (fle.env.namespace.factorionamespace method)": [[10, "fle.env.namespace.FactorioNamespace.load_messages", false]], "log() (fle.env.namespace.factorionamespace method)": [[10, "fle.env.namespace.FactorioNamespace.log", false]], "logistics (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.Logistics", false]], "logistics2 (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.Logistics2", false]], "logistics3 (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.Logistics3", false]], "logisticssciencepack (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.LogisticsSciencePack", false]], "logisticssciencepack (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.LogisticsSciencePack", false]], "logit_bias (fle.commons.models.generationparameters attribute)": [[5, "fle.commons.models.GenerationParameters.logit_bias", false]], "longhandedinserter (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.LongHandedInserter", false]], "loopcontext (class in fle.env.namespace)": [[10, "fle.env.namespace.LoopContext", false]], "low_input_fluid (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.LOW_INPUT_FLUID", false]], "low_power (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.LOW_POWER", false]], "low_temperature (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.LOW_TEMPERATURE", false]], "lowdensitystructure (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.LowDensityStructure", false]], "lowdensitystructure (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.LowDensityStructure", false]], "lubricant (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Lubricant", false]], "lubricant (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.Lubricant", false]], "magazine_size (fle.env.entities.ammo attribute)": [[6, "fle.env.entities.Ammo.magazine_size", false]], "max_static_unit_profit_cap (fle.commons.models.profitconfig attribute)": [[5, "fle.commons.models.ProfitConfig.max_static_unit_profit_cap", false]], "max_tokens (fle.commons.models.generationparameters attribute)": [[5, "fle.commons.models.GenerationParameters.max_tokens", false]], "mediumelectricpole (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.MediumElectricPole", false]], "message (class in fle.commons.models)": [[5, "fle.commons.models.Message", false]], "messages (fle.commons.models.conversation attribute)": [[5, "fle.commons.models.Conversation.messages", false]], "meta (fle.agents.models.taskresponse attribute)": [[4, "fle.agents.models.TaskResponse.meta", false]], "meta (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.meta", false]], "metadata (fle.agents.models.completionresult attribute)": [[4, "fle.agents.models.CompletionResult.metadata", false]], "metadata (fle.commons.models.message attribute)": [[5, "fle.commons.models.Message.metadata", false]], "metadata (fle.commons.models.timingmetrics attribute)": [[5, "fle.commons.models.TimingMetrics.metadata", false]], "militaryscience (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.MilitaryScience", false]], "militarysciencepack (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.MilitarySciencePack", false]], "militarysciencepack (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.MilitarySciencePack", false]], "miningdrill (class in fle.env.entities)": [[6, "fle.env.entities.MiningDrill", false]], "missing_required_fluid (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.MISSING_REQUIRED_FLUID", false]], "missing_science_packs (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.MISSING_SCIENCE_PACKS", false]], "model (fle.agents.agent_abc.agentabc attribute)": [[3, "fle.agents.agent_abc.AgentABC.model", false]], "model (fle.commons.models.generationparameters attribute)": [[5, "fle.commons.models.GenerationParameters.model", false]], "model (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.model", false]], "model_config (fle.agents.models.completionresult attribute)": [[4, "fle.agents.models.CompletionResult.model_config", false]], "model_config (fle.agents.models.response attribute)": [[4, "fle.agents.models.Response.model_config", false]], "model_config (fle.agents.models.taskresponse attribute)": [[4, "fle.agents.models.TaskResponse.model_config", false]], "model_config (fle.commons.models.conversation attribute)": [[5, "fle.commons.models.Conversation.model_config", false]], "model_config (fle.commons.models.generationparameters attribute)": [[5, "fle.commons.models.GenerationParameters.model_config", false]], "model_config (fle.commons.models.message attribute)": [[5, "fle.commons.models.Message.model_config", false]], "model_config (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.model_config", false]], "model_config (fle.commons.models.timingmetrics attribute)": [[5, "fle.commons.models.TimingMetrics.model_config", false]], "model_config (fle.env.entities.accumulator attribute)": [[6, "fle.env.entities.Accumulator.model_config", false]], "model_config (fle.env.entities.advancedassemblingmachine attribute)": [[6, "fle.env.entities.AdvancedAssemblingMachine.model_config", false]], "model_config (fle.env.entities.ammo attribute)": [[6, "fle.env.entities.Ammo.model_config", false]], "model_config (fle.env.entities.assemblingmachine attribute)": [[6, "fle.env.entities.AssemblingMachine.model_config", false]], "model_config (fle.env.entities.beltgroup attribute)": [[6, "fle.env.entities.BeltGroup.model_config", false]], "model_config (fle.env.entities.boiler attribute)": [[6, "fle.env.entities.Boiler.model_config", false]], "model_config (fle.env.entities.boundingbox attribute)": [[6, "fle.env.entities.BoundingBox.model_config", false]], "model_config (fle.env.entities.buildingbox attribute)": [[6, "fle.env.entities.BuildingBox.model_config", false]], "model_config (fle.env.entities.burnerinserter attribute)": [[6, "fle.env.entities.BurnerInserter.model_config", false]], "model_config (fle.env.entities.burnerminingdrill attribute)": [[6, "fle.env.entities.BurnerMiningDrill.model_config", false]], "model_config (fle.env.entities.burnertype attribute)": [[6, "fle.env.entities.BurnerType.model_config", false]], "model_config (fle.env.entities.chemicalplant attribute)": [[6, "fle.env.entities.ChemicalPlant.model_config", false]], "model_config (fle.env.entities.chest attribute)": [[6, "fle.env.entities.Chest.model_config", false]], "model_config (fle.env.entities.dimensions attribute)": [[6, "fle.env.entities.Dimensions.model_config", false]], "model_config (fle.env.entities.electric attribute)": [[6, "fle.env.entities.Electric.model_config", false]], "model_config (fle.env.entities.electricalproducer attribute)": [[6, "fle.env.entities.ElectricalProducer.model_config", false]], "model_config (fle.env.entities.electricfurnace attribute)": [[6, "fle.env.entities.ElectricFurnace.model_config", false]], "model_config (fle.env.entities.electricitygroup attribute)": [[6, "fle.env.entities.ElectricityGroup.model_config", false]], "model_config (fle.env.entities.electricitypole attribute)": [[6, "fle.env.entities.ElectricityPole.model_config", false]], "model_config (fle.env.entities.electricminingdrill attribute)": [[6, "fle.env.entities.ElectricMiningDrill.model_config", false]], "model_config (fle.env.entities.energysource attribute)": [[6, "fle.env.entities.EnergySource.model_config", false]], "model_config (fle.env.entities.entity attribute)": [[6, "fle.env.entities.Entity.model_config", false], [13, "fle.env.entities.Entity.model_config", false]], "model_config (fle.env.entities.entitycore attribute)": [[6, "fle.env.entities.EntityCore.model_config", false]], "model_config (fle.env.entities.entitygroup attribute)": [[6, "fle.env.entities.EntityGroup.model_config", false]], "model_config (fle.env.entities.entityinfo attribute)": [[6, "fle.env.entities.EntityInfo.model_config", false]], "model_config (fle.env.entities.filtered attribute)": [[6, "fle.env.entities.Filtered.model_config", false]], "model_config (fle.env.entities.filterinserter attribute)": [[6, "fle.env.entities.FilterInserter.model_config", false]], "model_config (fle.env.entities.fluidhandler attribute)": [[6, "fle.env.entities.FluidHandler.model_config", false]], "model_config (fle.env.entities.furnace attribute)": [[6, "fle.env.entities.Furnace.model_config", false]], "model_config (fle.env.entities.generator attribute)": [[6, "fle.env.entities.Generator.model_config", false]], "model_config (fle.env.entities.gunturret attribute)": [[6, "fle.env.entities.GunTurret.model_config", false]], "model_config (fle.env.entities.heatexchanger attribute)": [[6, "fle.env.entities.HeatExchanger.model_config", false]], "model_config (fle.env.entities.indexedposition attribute)": [[6, "fle.env.entities.IndexedPosition.model_config", false]], "model_config (fle.env.entities.ingredient attribute)": [[6, "fle.env.entities.Ingredient.model_config", false]], "model_config (fle.env.entities.inserter attribute)": [[6, "fle.env.entities.Inserter.model_config", false]], "model_config (fle.env.entities.inspectionresults attribute)": [[6, "fle.env.entities.InspectionResults.model_config", false]], "model_config (fle.env.entities.inventory attribute)": [[6, "fle.env.entities.Inventory.model_config", false]], "model_config (fle.env.entities.lab attribute)": [[6, "fle.env.entities.Lab.model_config", false]], "model_config (fle.env.entities.miningdrill attribute)": [[6, "fle.env.entities.MiningDrill.model_config", false]], "model_config (fle.env.entities.multifluidhandler attribute)": [[6, "fle.env.entities.MultiFluidHandler.model_config", false]], "model_config (fle.env.entities.offshorepump attribute)": [[6, "fle.env.entities.OffshorePump.model_config", false]], "model_config (fle.env.entities.oilrefinery attribute)": [[6, "fle.env.entities.OilRefinery.model_config", false]], "model_config (fle.env.entities.pipe attribute)": [[6, "fle.env.entities.Pipe.model_config", false]], "model_config (fle.env.entities.pipegroup attribute)": [[6, "fle.env.entities.PipeGroup.model_config", false]], "model_config (fle.env.entities.position attribute)": [[6, "fle.env.entities.Position.model_config", false]], "model_config (fle.env.entities.product attribute)": [[6, "fle.env.entities.Product.model_config", false]], "model_config (fle.env.entities.pump attribute)": [[6, "fle.env.entities.Pump.model_config", false]], "model_config (fle.env.entities.pumpjack attribute)": [[6, "fle.env.entities.PumpJack.model_config", false]], "model_config (fle.env.entities.rail attribute)": [[6, "fle.env.entities.Rail.model_config", false]], "model_config (fle.env.entities.reactor attribute)": [[6, "fle.env.entities.Reactor.model_config", false]], "model_config (fle.env.entities.recipe attribute)": [[6, "fle.env.entities.Recipe.model_config", false]], "model_config (fle.env.entities.resourcepatch attribute)": [[6, "fle.env.entities.ResourcePatch.model_config", false]], "model_config (fle.env.entities.rocket attribute)": [[6, "fle.env.entities.Rocket.model_config", false]], "model_config (fle.env.entities.rocketsilo attribute)": [[6, "fle.env.entities.RocketSilo.model_config", false]], "model_config (fle.env.entities.solarpanel attribute)": [[6, "fle.env.entities.SolarPanel.model_config", false]], "model_config (fle.env.entities.splitter attribute)": [[6, "fle.env.entities.Splitter.model_config", false]], "model_config (fle.env.entities.staticentity attribute)": [[6, "fle.env.entities.StaticEntity.model_config", false]], "model_config (fle.env.entities.storagetank attribute)": [[6, "fle.env.entities.StorageTank.model_config", false]], "model_config (fle.env.entities.tiledimensions attribute)": [[6, "fle.env.entities.TileDimensions.model_config", false]], "model_config (fle.env.entities.transportbelt attribute)": [[6, "fle.env.entities.TransportBelt.model_config", false]], "model_config (fle.env.entities.undergroundbelt attribute)": [[6, "fle.env.entities.UndergroundBelt.model_config", false]], "model_config (fle.env.entities.wallgroup attribute)": [[6, "fle.env.entities.WallGroup.model_config", false]], "model_post_init() (fle.env.entities.accumulator method)": [[6, "fle.env.entities.Accumulator.model_post_init", false]], "model_post_init() (fle.env.entities.advancedassemblingmachine method)": [[6, "fle.env.entities.AdvancedAssemblingMachine.model_post_init", false]], "model_post_init() (fle.env.entities.assemblingmachine method)": [[6, "fle.env.entities.AssemblingMachine.model_post_init", false]], "model_post_init() (fle.env.entities.boiler method)": [[6, "fle.env.entities.Boiler.model_post_init", false]], "model_post_init() (fle.env.entities.burnerinserter method)": [[6, "fle.env.entities.BurnerInserter.model_post_init", false]], "model_post_init() (fle.env.entities.burnerminingdrill method)": [[6, "fle.env.entities.BurnerMiningDrill.model_post_init", false]], "model_post_init() (fle.env.entities.chemicalplant method)": [[6, "fle.env.entities.ChemicalPlant.model_post_init", false]], "model_post_init() (fle.env.entities.chest method)": [[6, "fle.env.entities.Chest.model_post_init", false]], "model_post_init() (fle.env.entities.electricfurnace method)": [[6, "fle.env.entities.ElectricFurnace.model_post_init", false]], "model_post_init() (fle.env.entities.electricitypole method)": [[6, "fle.env.entities.ElectricityPole.model_post_init", false]], "model_post_init() (fle.env.entities.electricminingdrill method)": [[6, "fle.env.entities.ElectricMiningDrill.model_post_init", false]], "model_post_init() (fle.env.entities.filterinserter method)": [[6, "fle.env.entities.FilterInserter.model_post_init", false]], "model_post_init() (fle.env.entities.furnace method)": [[6, "fle.env.entities.Furnace.model_post_init", false]], "model_post_init() (fle.env.entities.generator method)": [[6, "fle.env.entities.Generator.model_post_init", false]], "model_post_init() (fle.env.entities.gunturret method)": [[6, "fle.env.entities.GunTurret.model_post_init", false]], "model_post_init() (fle.env.entities.heatexchanger method)": [[6, "fle.env.entities.HeatExchanger.model_post_init", false]], "model_post_init() (fle.env.entities.inserter method)": [[6, "fle.env.entities.Inserter.model_post_init", false]], "model_post_init() (fle.env.entities.lab method)": [[6, "fle.env.entities.Lab.model_post_init", false]], "model_post_init() (fle.env.entities.offshorepump method)": [[6, "fle.env.entities.OffshorePump.model_post_init", false]], "model_post_init() (fle.env.entities.oilrefinery method)": [[6, "fle.env.entities.OilRefinery.model_post_init", false]], "model_post_init() (fle.env.entities.pipe method)": [[6, "fle.env.entities.Pipe.model_post_init", false]], "model_post_init() (fle.env.entities.pump method)": [[6, "fle.env.entities.Pump.model_post_init", false]], "model_post_init() (fle.env.entities.pumpjack method)": [[6, "fle.env.entities.PumpJack.model_post_init", false]], "model_post_init() (fle.env.entities.rail method)": [[6, "fle.env.entities.Rail.model_post_init", false]], "model_post_init() (fle.env.entities.reactor method)": [[6, "fle.env.entities.Reactor.model_post_init", false]], "model_post_init() (fle.env.entities.rocketsilo method)": [[6, "fle.env.entities.RocketSilo.model_post_init", false]], "model_post_init() (fle.env.entities.solarpanel method)": [[6, "fle.env.entities.SolarPanel.model_post_init", false]], "model_post_init() (fle.env.entities.splitter method)": [[6, "fle.env.entities.Splitter.model_post_init", false]], "model_post_init() (fle.env.entities.storagetank method)": [[6, "fle.env.entities.StorageTank.model_post_init", false]], "model_post_init() (fle.env.entities.transportbelt method)": [[6, "fle.env.entities.TransportBelt.model_post_init", false]], "model_post_init() (fle.env.entities.undergroundbelt method)": [[6, "fle.env.entities.UndergroundBelt.model_post_init", false]], "modulararmor (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.ModularArmor", false]], "module": [[3, "module-fle.agents.agent_abc", false], [4, "module-fle.agents.models", false], [5, "module-fle.commons.models", false], [6, "module-fle.env.entities", false], [7, "module-fle.env.game_types", false], [8, "module-fle.env.gym_env", false], [9, "module-fle.env.instance", false], [10, "module-fle.env.namespace", false], [11, "module-fle.eval.algorithms", false], [12, "module-fle.eval.tasks", false]], "multifluidhandler (class in fle.env.entities)": [[6, "fle.env.entities.MultiFluidHandler", false]], "n (fle.commons.models.generationparameters attribute)": [[5, "fle.commons.models.GenerationParameters.n", false]], "name (fle.commons.models.technologystate attribute)": [[5, "fle.commons.models.TechnologyState.name", false]], "name (fle.env.entities.ammo attribute)": [[6, "fle.env.entities.Ammo.name", false]], "name (fle.env.entities.beltgroup attribute)": [[6, "fle.env.entities.BeltGroup.name", false]], "name (fle.env.entities.electricitygroup attribute)": [[6, "fle.env.entities.ElectricityGroup.name", false]], "name (fle.env.entities.entitycore attribute)": [[6, "fle.env.entities.EntityCore.name", false]], "name (fle.env.entities.entitygroup attribute)": [[6, "fle.env.entities.EntityGroup.name", false]], "name (fle.env.entities.entityinfo attribute)": [[6, "fle.env.entities.EntityInfo.name", false]], "name (fle.env.entities.ingredient attribute)": [[6, "fle.env.entities.Ingredient.name", false]], "name (fle.env.entities.pipegroup attribute)": [[6, "fle.env.entities.PipeGroup.name", false]], "name (fle.env.entities.recipe attribute)": [[6, "fle.env.entities.Recipe.name", false]], "name (fle.env.entities.resourcepatch attribute)": [[6, "fle.env.entities.ResourcePatch.name", false]], "name (fle.env.entities.wallgroup attribute)": [[6, "fle.env.entities.WallGroup.name", false]], "namespace (fle.env.instance.factorioinstance property)": [[1, "fle.env.instance.FactorioInstance.namespace", false], [9, "fle.env.instance.FactorioInstance.namespace", false]], "namespace_class (fle.env.instance.factorioinstance attribute)": [[1, "fle.env.instance.FactorioInstance.namespace_class", false], [9, "fle.env.instance.FactorioInstance.namespace_class", false]], "namespaces (fle.commons.models.gamestate attribute)": [[5, "fle.commons.models.GameState.namespaces", false]], "natural (fle.env.entities.layer attribute)": [[6, "fle.env.entities.Layer.NATURAL", false]], "neighbours (fle.env.entities.staticentity attribute)": [[6, "fle.env.entities.StaticEntity.neighbours", false]], "next_clockwise() (fle.env.instance.directioninternal class method)": [[9, "fle.env.instance.DirectionInternal.next_clockwise", false]], "next_counterclockwise() (fle.env.instance.directioninternal class method)": [[9, "fle.env.instance.DirectionInternal.next_counterclockwise", false]], "nightvision (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.NightVision", false]], "no_ammo (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.NO_AMMO", false]], "no_fuel (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.NO_FUEL", false]], "no_ingredients (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.NO_INGREDIENTS", false]], "no_input_fluid (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.NO_INPUT_FLUID", false]], "no_minable_resources (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.NO_MINABLE_RESOURCES", false]], "no_power (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.NO_POWER", false]], "no_recipe (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.NO_RECIPE", false]], "no_research_in_progress (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.NO_RESEARCH_IN_PROGRESS", false]], "none (fle.env.entities.layer attribute)": [[6, "fle.env.entities.Layer.NONE", false]], "normal (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.NORMAL", false]], "north (fle.env.entities.direction attribute)": [[6, "fle.env.entities.Direction.NORTH", false]], "north (fle.env.instance.directioninternal attribute)": [[9, "fle.env.instance.DirectionInternal.NORTH", false]], "not_connected (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.NOT_CONNECTED", false]], "not_connected_to_rail (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.NOT_CONNECTED_TO_RAIL", false]], "not_plugged_in_electric_network (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.NOT_PLUGGED_IN_ELECTRIC_NETWORK", false]], "nuclearfuelreprocessing (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.NuclearFuelReprocessing", false]], "nuclearpower (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.NuclearPower", false]], "nuclearreactor (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.NuclearReactor", false]], "num_agents (fle.commons.models.gamestate property)": [[5, "fle.commons.models.GameState.num_agents", false]], "offshorepump (class in fle.env.entities)": [[6, "fle.env.entities.OffshorePump", false]], "offshorepump (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.OffshorePump", false]], "oilprocessing (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.OilProcessing", false]], "oilrefinery (class in fle.env.entities)": [[6, "fle.env.entities.OilRefinery", false]], "oilrefinery (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.OilRefinery", false]], "operation_name (fle.commons.models.timingmetrics attribute)": [[5, "fle.commons.models.TimingMetrics.operation_name", false]], "opposite() (fle.env.instance.directioninternal class method)": [[9, "fle.env.instance.DirectionInternal.opposite", false]], "origin (fle.env.entities.layer attribute)": [[6, "fle.env.entities.Layer.ORIGIN", false]], "output (fle.commons.models.productionflows attribute)": [[5, "fle.commons.models.ProductionFlows.output", false]], "output_connection_points (fle.env.entities.multifluidhandler attribute)": [[6, "fle.env.entities.MultiFluidHandler.output_connection_points", false]], "output_flow_limit (fle.env.entities.energysource attribute)": [[6, "fle.env.entities.EnergySource.output_flow_limit", false]], "output_fluids (fle.env.entities.multifluidhandler attribute)": [[6, "fle.env.entities.MultiFluidHandler.output_fluids", false]], "output_position (fle.env.entities.transportbelt attribute)": [[6, "fle.env.entities.TransportBelt.output_position", false]], "output_positions (fle.env.entities.splitter attribute)": [[6, "fle.env.entities.Splitter.output_positions", false]], "outputs (fle.env.entities.beltgroup attribute)": [[6, "fle.env.entities.BeltGroup.outputs", false]], "parent_id (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.parent_id", false]], "parse() (fle.commons.models.gamestate class method)": [[5, "fle.commons.models.GameState.parse", false]], "parse_agent_messages() (fle.commons.models.gamestate method)": [[5, "fle.commons.models.GameState.parse_agent_messages", false]], "parse_args() (fle.env.entities.position class method)": [[6, "fle.env.entities.Position.parse_args", false]], "parse_raw() (fle.commons.models.conversation class method)": [[5, "fle.commons.models.Conversation.parse_raw", false]], "parse_raw() (fle.commons.models.gamestate class method)": [[5, "fle.commons.models.GameState.parse_raw", false]], "pause() (fle.env.instance.factorioinstance method)": [[1, "fle.env.instance.FactorioInstance.pause", false], [9, "fle.env.instance.FactorioInstance.pause", false]], "pause() (fle.env.instance.gamecontrol method)": [[9, "fle.env.instance.GameControl.pause", false]], "pause_at_speed() (fle.env.instance.gamecontrol method)": [[9, "fle.env.instance.GameControl.pause_at_speed", false]], "payload (fle.env.entities.rocket attribute)": [[6, "fle.env.entities.Rocket.payload", false]], "petroleumgas (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.PetroleumGas", false]], "pickup_position (fle.env.entities.inserter attribute)": [[6, "fle.env.entities.Inserter.pickup_position", false]], "piercingroundsmagazine (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.PiercingRoundsMagazine", false]], "pipe (class in fle.env.entities)": [[6, "fle.env.entities.Pipe", false]], "pipe (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Pipe", false]], "pipegroup (class in fle.env.entities)": [[6, "fle.env.entities.PipeGroup", false]], "pipegroup (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.PipeGroup", false]], "pipes (fle.env.entities.pipegroup attribute)": [[6, "fle.env.entities.PipeGroup.pipes", false]], "plasticbar (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.PlasticBar", false]], "plastics (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.Plastics", false]], "player (fle.env.entities.layer attribute)": [[6, "fle.env.entities.Layer.PLAYER", false]], "player_position (fle.env.entities.inspectionresults attribute)": [[6, "fle.env.entities.InspectionResults.player_position", false]], "poles (fle.env.entities.electricitygroup attribute)": [[6, "fle.env.entities.ElectricityGroup.poles", false]], "position (class in fle.env.entities)": [[6, "fle.env.entities.Position", false]], "position (fle.env.entities.entitycore attribute)": [[6, "fle.env.entities.EntityCore.position", false]], "position (fle.env.entities.entitygroup attribute)": [[6, "fle.env.entities.EntityGroup.position", false]], "position (fle.env.entities.entityinfo attribute)": [[6, "fle.env.entities.EntityInfo.position", false]], "powerarmor (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.PowerArmor", false]], "powerarmor2 (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.PowerArmor2", false]], "preparing_rocket_for_launch (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.PREPARING_ROCKET_FOR_LAUNCH", false]], "prerequisites (fle.commons.models.technologystate attribute)": [[5, "fle.commons.models.TechnologyState.prerequisites", false]], "presence_penalty (fle.commons.models.generationparameters attribute)": [[5, "fle.commons.models.GenerationParameters.presence_penalty", false]], "price_list (fle.commons.models.productionflows attribute)": [[5, "fle.commons.models.ProductionFlows.price_list", false]], "probability (fle.env.entities.product attribute)": [[6, "fle.env.entities.Product.probability", false]], "processingunit (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ProcessingUnit", false]], "product (class in fle.env.entities)": [[6, "fle.env.entities.Product", false]], "production (fle.env.entities.electricalproducer attribute)": [[6, "fle.env.entities.ElectricalProducer.production", false]], "productionflows (class in fle.commons.models)": [[5, "fle.commons.models.ProductionFlows", false]], "productionsciencepack (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ProductionSciencePack", false]], "productionsciencepack (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.ProductionSciencePack", false]], "productivitymodule (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ProductivityModule", false]], "productivitymodule (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.ProductivityModule", false]], "productivitymodule2 (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ProductivityModule2", false]], "productivitymodule2 (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.ProductivityModule2", false]], "productivitymodule3 (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.ProductivityModule3", false]], "productivitymodule3 (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.ProductivityModule3", false]], "products (fle.env.entities.recipe attribute)": [[6, "fle.env.entities.Recipe.products", false]], "profitconfig (class in fle.commons.models)": [[5, "fle.commons.models.ProfitConfig", false]], "program (class in fle.commons.models)": [[5, "fle.commons.models.Program", false]], "program_id (fle.agents.models.response attribute)": [[4, "fle.agents.models.Response.program_id", false]], "progress (fle.commons.models.researchstate attribute)": [[5, "fle.commons.models.ResearchState.progress", false]], "prompt_token_usage (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.prompt_token_usage", false]], "prototype (class in fle.env.game_types)": [[7, "fle.env.game_types.Prototype", false]], "prototype (fle.env.entities.entity attribute)": [[6, "fle.env.entities.Entity.prototype", false], [13, "fle.env.entities.Entity.prototype", false]], "prototypemetaclass (class in fle.env.game_types)": [[7, "fle.env.game_types.PrototypeMetaclass", false]], "pump (class in fle.env.entities)": [[6, "fle.env.entities.Pump", false]], "pump (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Pump", false]], "pumpjack (class in fle.env.entities)": [[6, "fle.env.entities.PumpJack", false]], "pumpjack (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.PumpJack", false]], "quantity (fle.env.entities.entityinfo attribute)": [[6, "fle.env.entities.EntityInfo.quantity", false]], "radar (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Radar", false]], "radius (fle.env.entities.inspectionresults attribute)": [[6, "fle.env.entities.InspectionResults.radius", false]], "rail (class in fle.env.entities)": [[6, "fle.env.entities.Rail", false]], "rail (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Rail", false]], "railwaytransportation (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.RailwayTransportation", false]], "raw_reward (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.raw_reward", false]], "reactor (class in fle.env.entities)": [[6, "fle.env.entities.Reactor", false]], "reason (fle.agents.models.completionresult attribute)": [[4, "fle.agents.models.CompletionResult.reason", false]], "recipe (class in fle.env.entities)": [[6, "fle.env.entities.Recipe", false]], "recipe (fle.env.entities.assemblingmachine attribute)": [[6, "fle.env.entities.AssemblingMachine.recipe", false]], "recipename (class in fle.env.game_types)": [[7, "fle.env.game_types.RecipeName", false]], "reconstruct() (fle.commons.models.serializablefunction static method)": [[5, "fle.commons.models.SerializableFunction.reconstruct", false]], "register_all_environments() (in module fle.env.gym_env.registry)": [[1, "fle.env.gym_env.registry.register_all_environments", false]], "reload_time (fle.env.entities.ammo attribute)": [[6, "fle.env.entities.Ammo.reload_time", false]], "research (fle.commons.models.gamestate attribute)": [[5, "fle.commons.models.GameState.research", false]], "research (fle.env.entities.lab attribute)": [[6, "fle.env.entities.Lab.research", false]], "research_progress (fle.commons.models.researchstate attribute)": [[5, "fle.commons.models.ResearchState.research_progress", false]], "research_queue (fle.commons.models.researchstate attribute)": [[5, "fle.commons.models.ResearchState.research_queue", false]], "research_unit_count (fle.commons.models.technologystate attribute)": [[5, "fle.commons.models.TechnologyState.research_unit_count", false]], "research_unit_energy (fle.commons.models.technologystate attribute)": [[5, "fle.commons.models.TechnologyState.research_unit_energy", false]], "researched (fle.commons.models.technologystate attribute)": [[5, "fle.commons.models.TechnologyState.researched", false]], "researchspeed (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.ResearchSpeed", false]], "researchstate (class in fle.commons.models)": [[5, "fle.commons.models.ResearchState", false]], "reset() (fle.env.instance.factorioinstance method)": [[1, "fle.env.instance.FactorioInstance.reset", false], [1, "id0", false], [9, "fle.env.instance.FactorioInstance.reset", false]], "reset() (fle.env.namespace.factorionamespace method)": [[10, "fle.env.namespace.FactorioNamespace.reset", false]], "reset_to_defaults() (fle.env.instance.gamecontrol method)": [[9, "fle.env.instance.GameControl.reset_to_defaults", false]], "resource (class in fle.env.game_types)": [[7, "fle.env.game_types.Resource", false]], "resourcename (class in fle.env.game_types)": [[7, "fle.env.game_types.ResourceName", false]], "resourcepatch (class in fle.env.entities)": [[6, "fle.env.entities.ResourcePatch", false]], "resources (fle.env.entities.layer attribute)": [[6, "fle.env.entities.Layer.RESOURCES", false]], "resources (fle.env.entities.miningdrill attribute)": [[6, "fle.env.entities.MiningDrill.resources", false]], "response (class in fle.agents.models)": [[4, "fle.agents.models.Response", false]], "response (fle.agents.models.response attribute)": [[4, "fle.agents.models.Response.response", false]], "response (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.response", false]], "right (fle.env.entities.direction attribute)": [[6, "fle.env.entities.Direction.RIGHT", false]], "right (fle.env.instance.directioninternal attribute)": [[9, "fle.env.instance.DirectionInternal.RIGHT", false]], "right() (fle.env.entities.position method)": [[6, "fle.env.entities.Position.right", false]], "right_bottom (fle.env.entities.boundingbox attribute)": [[6, "fle.env.entities.BoundingBox.right_bottom", false]], "right_top (fle.env.entities.boundingbox attribute)": [[6, "fle.env.entities.BoundingBox.right_top", false]], "robotics (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.Robotics", false]], "rocket (class in fle.env.entities)": [[6, "fle.env.entities.Rocket", false]], "rocket (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Rocket", false]], "rocket_inventory (fle.env.entities.rocketsilo attribute)": [[6, "fle.env.entities.RocketSilo.rocket_inventory", false]], "rocket_parts (fle.env.entities.rocketsilo attribute)": [[6, "fle.env.entities.RocketSilo.rocket_parts", false]], "rocket_progress (fle.env.entities.rocketsilo attribute)": [[6, "fle.env.entities.RocketSilo.rocket_progress", false]], "rocketcontrol (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.RocketControl", false]], "rocketcontrolunit (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.RocketControlUnit", false]], "rocketfuel (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.RocketFuel", false]], "rocketfuel (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.RocketFuel", false]], "rocketpart (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.RocketPart", false]], "rocketsilo (class in fle.env.entities)": [[6, "fle.env.entities.RocketSilo", false]], "rocketsilo (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.RocketSilo", false]], "rocketsilotechnology (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.RocketSiloTechnology", false]], "rocks (fle.env.entities.layer attribute)": [[6, "fle.env.entities.Layer.ROCKS", false]], "role (fle.commons.models.message attribute)": [[5, "fle.commons.models.Message.role", false]], "runtime_error (fle.agents.models.completionreason attribute)": [[4, "fle.agents.models.CompletionReason.RUNTIME_ERROR", false]], "satellite (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Satellite", false]], "score (fle.agents.models.response attribute)": [[4, "fle.agents.models.Response.score", false]], "serializablefunction (class in fle.commons.models)": [[5, "fle.commons.models.SerializableFunction", false]], "serialize_model() (fle.env.entities.inventory method)": [[6, "fle.env.entities.Inventory.serialize_model", false]], "set_conversation() (fle.agents.agent_abc.agentabc method)": [[3, "fle.agents.agent_abc.AgentABC.set_conversation", false]], "set_speed() (fle.env.instance.factorioinstance method)": [[1, "fle.env.instance.FactorioInstance.set_speed", false], [9, "fle.env.instance.FactorioInstance.set_speed", false]], "set_speed() (fle.env.instance.gamecontrol method)": [[9, "fle.env.instance.GameControl.set_speed", false]], "set_speed_and_unpause() (fle.env.instance.factorioinstance method)": [[1, "fle.env.instance.FactorioInstance.set_speed_and_unpause", false], [9, "fle.env.instance.FactorioInstance.set_speed_and_unpause", false]], "set_speed_and_unpause() (fle.env.instance.gamecontrol method)": [[9, "fle.env.instance.GameControl.set_speed_and_unpause", false]], "set_system_message() (fle.commons.models.conversation method)": [[5, "fle.commons.models.Conversation.set_system_message", false]], "setup() (fle.eval.tasks.taskabc method)": [[12, "fle.eval.tasks.TaskABC.setup", false]], "setup_instance() (fle.eval.tasks.defaulttask method)": [[12, "fle.eval.tasks.DefaultTask.setup_instance", false]], "setup_instance() (fle.eval.tasks.taskabc method)": [[12, "fle.eval.tasks.TaskABC.setup_instance", false]], "setup_instance() (fle.eval.tasks.throughputtask method)": [[12, "fle.eval.tasks.ThroughputTask.setup_instance", false]], "setup_instance() (fle.eval.tasks.unboundedthroughputtask method)": [[12, "fle.eval.tasks.UnboundedThroughputTask.setup_instance", false]], "size (fle.env.entities.resourcepatch attribute)": [[6, "fle.env.entities.ResourcePatch.size", false]], "smallelectricpole (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.SmallElectricPole", false]], "smalllamp (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.SmallLamp", false]], "solarenergy (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.SolarEnergy", false]], "solarpanel (class in fle.env.entities)": [[6, "fle.env.entities.SolarPanel", false]], "solarpanel (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.SolarPanel", false]], "solidfuel (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.SolidFuel", false]], "solidfuelfromheavyoil (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.SolidFuelFromHeavyOil", false]], "solidfuelfromlightoil (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.SolidFuelFromLightOil", false]], "solidfuelfrompetroleumgas (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.SolidFuelFromPetroleumGas", false]], "south (fle.env.entities.direction attribute)": [[6, "fle.env.entities.Direction.SOUTH", false]], "south (fle.env.instance.directioninternal attribute)": [[9, "fle.env.instance.DirectionInternal.SOUTH", false]], "spacescience (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.SpaceScience", false]], "spacesciencepack (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.SpaceSciencePack", false]], "splitter (class in fle.env.entities)": [[6, "fle.env.entities.Splitter", false]], "splitter (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Splitter", false]], "stackfilterinserter (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.StackFilterInserter", false]], "stackinserter (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.StackInserter", false]], "stackinserter (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.StackInserter", false]], "stackinsertercapacity1 (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.StackInserterCapacity1", false]], "stackinsertercapacity2 (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.StackInserterCapacity2", false]], "start_position (fle.env.entities.entityinfo attribute)": [[6, "fle.env.entities.EntityInfo.start_position", false]], "start_time (fle.commons.models.timingmetrics attribute)": [[5, "fle.commons.models.TimingMetrics.start_time", false]], "state (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.state", false]], "static_items (fle.commons.models.productionflows attribute)": [[5, "fle.commons.models.ProductionFlows.static_items", false]], "staticentity (class in fle.env.entities)": [[6, "fle.env.entities.StaticEntity", false]], "status (fle.env.entities.entity attribute)": [[6, "fle.env.entities.Entity.status", false], [13, "fle.env.entities.Entity.status", false]], "status (fle.env.entities.entitygroup attribute)": [[6, "fle.env.entities.EntityGroup.status", false]], "status (fle.env.entities.entityinfo attribute)": [[6, "fle.env.entities.EntityInfo.status", false]], "steam_output_point (fle.env.entities.boiler attribute)": [[6, "fle.env.entities.Boiler.steam_output_point", false]], "steamengine (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.SteamEngine", false]], "steelchest (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.SteelChest", false]], "steelfurnace (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.SteelFurnace", false]], "steelplate (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.SteelPlate", false]], "steelprocessing (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.SteelProcessing", false]], "step (fle.agents.models.completionresult attribute)": [[4, "fle.agents.models.CompletionResult.step", false]], "step (fle.agents.models.response attribute)": [[4, "fle.agents.models.Response.step", false]], "step() (fle.agents.agent_abc.agentabc method)": [[3, "fle.agents.agent_abc.AgentABC.step", false]], "stone (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Stone", false]], "stone (fle.env.game_types.resource attribute)": [[7, "fle.env.game_types.Resource.Stone", false]], "stone (fle.env.game_types.resourcename attribute)": [[7, "fle.env.game_types.ResourceName.Stone", false]], "stonebrick (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.StoneBrick", false]], "stonefurnace (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.StoneFurnace", false]], "stonewall (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.StoneWall", false]], "stop_sequences (fle.commons.models.generationparameters attribute)": [[5, "fle.commons.models.GenerationParameters.stop_sequences", false]], "storagetank (class in fle.env.entities)": [[6, "fle.env.entities.StorageTank", false]], "storagetank (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.StorageTank", false]], "storagetanks (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.StorageTanks", false]], "success (fle.agents.models.completionreason attribute)": [[4, "fle.agents.models.CompletionReason.SUCCESS", false]], "success (fle.agents.models.taskresponse attribute)": [[4, "fle.agents.models.TaskResponse.success", false]], "sulfur (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Sulfur", false]], "sulfuricacid (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.SulfuricAcid", false]], "sulfuricacid (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.SulfuricAcid", false]], "sulfurprocessing (fle.env.game_types.technology attribute)": [[7, "fle.env.game_types.Technology.SulfurProcessing", false]], "system_prompt (fle.agents.agent_abc.agentabc attribute)": [[3, "fle.agents.agent_abc.AgentABC.system_prompt", false]], "task (fle.agents.models.response attribute)": [[4, "fle.agents.models.Response.task", false]], "taskabc (class in fle.eval.tasks)": [[12, "fle.eval.tasks.TaskABC", false]], "taskfactory (class in fle.eval.tasks)": [[12, "fle.eval.tasks.TaskFactory", false]], "taskresponse (class in fle.agents.models)": [[4, "fle.agents.models.TaskResponse", false]], "technologies (fle.commons.models.researchstate attribute)": [[5, "fle.commons.models.ResearchState.technologies", false]], "technology (class in fle.env.game_types)": [[7, "fle.env.game_types.Technology", false]], "technologystate (class in fle.commons.models)": [[5, "fle.commons.models.TechnologyState", false]], "temperature (fle.commons.models.generationparameters attribute)": [[5, "fle.commons.models.GenerationParameters.temperature", false]], "throughputtask (class in fle.eval.tasks)": [[12, "fle.eval.tasks.ThroughputTask", false]], "ticks (fle.agents.models.response attribute)": [[4, "fle.agents.models.Response.ticks", false]], "ticks (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.ticks", false]], "tile_dimensions (fle.env.entities.entity attribute)": [[6, "fle.env.entities.Entity.tile_dimensions", false], [13, "fle.env.entities.Entity.tile_dimensions", false]], "tile_height (fle.env.entities.tiledimensions attribute)": [[6, "fle.env.entities.TileDimensions.tile_height", false]], "tile_width (fle.env.entities.tiledimensions attribute)": [[6, "fle.env.entities.TileDimensions.tile_width", false]], "tiledimensions (class in fle.env.entities)": [[6, "fle.env.entities.TileDimensions", false]], "time_elapsed (fle.env.entities.inspectionresults attribute)": [[6, "fle.env.entities.InspectionResults.time_elapsed", false]], "timeout (fle.agents.models.completionreason attribute)": [[4, "fle.agents.models.CompletionReason.TIMEOUT", false]], "timestamp (fle.commons.models.gamestate attribute)": [[5, "fle.commons.models.GameState.timestamp", false]], "timing_metrics (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.timing_metrics", false]], "timingmetrics (class in fle.commons.models)": [[5, "fle.commons.models.TimingMetrics", false]], "to_bounding_box() (fle.env.entities.position method)": [[6, "fle.env.entities.Position.to_bounding_box", false]], "to_dict() (fle.commons.models.productionflows method)": [[5, "fle.commons.models.ProductionFlows.to_dict", false]], "to_dict() (fle.commons.models.timingmetrics method)": [[5, "fle.commons.models.TimingMetrics.to_dict", false]], "to_dict() (fle.env.gym_env.action.action method)": [[0, "fle.env.gym_env.action.Action.to_dict", false]], "to_factorio_direction() (fle.env.instance.directioninternal class method)": [[9, "fle.env.instance.DirectionInternal.to_factorio_direction", false]], "to_instance() (fle.commons.models.gamestate method)": [[5, "fle.commons.models.GameState.to_instance", false]], "to_raw() (fle.commons.models.gamestate method)": [[5, "fle.commons.models.GameState.to_raw", false]], "token_usage (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.token_usage", false]], "total_duration (fle.commons.models.timingmetrics property)": [[5, "fle.commons.models.TimingMetrics.total_duration", false]], "transportbelt (class in fle.env.entities)": [[6, "fle.env.entities.TransportBelt", false]], "transportbelt (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.TransportBelt", false]], "trees (fle.env.entities.layer attribute)": [[6, "fle.env.entities.Layer.TREES", false]], "turret_ammo (fle.env.entities.gunturret attribute)": [[6, "fle.env.entities.GunTurret.turret_ammo", false]], "type (fle.env.entities.entity attribute)": [[6, "fle.env.entities.Entity.type", false], [13, "fle.env.entities.Entity.type", false]], "type (fle.env.entities.indexedposition attribute)": [[6, "fle.env.entities.IndexedPosition.type", false]], "type (fle.env.entities.ingredient attribute)": [[6, "fle.env.entities.Ingredient.type", false]], "unboundedthroughputtask (class in fle.eval.tasks)": [[12, "fle.eval.tasks.UnboundedThroughputTask", false]], "undergroundbelt (class in fle.env.entities)": [[6, "fle.env.entities.UndergroundBelt", false]], "undergroundbelt (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.UndergroundBelt", false]], "undergroundpipe (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.UndergroundPipe", false]], "unpause() (fle.env.instance.factorioinstance method)": [[1, "fle.env.instance.FactorioInstance.unpause", false], [9, "fle.env.instance.FactorioInstance.unpause", false]], "unpause() (fle.env.instance.gamecontrol method)": [[9, "fle.env.instance.GameControl.unpause", false]], "unwrap_after_deserialization() (in module fle.env.namespace)": [[10, "fle.env.namespace.unwrap_after_deserialization", false]], "up (fle.env.entities.direction attribute)": [[6, "fle.env.entities.Direction.UP", false]], "up (fle.env.instance.directioninternal attribute)": [[9, "fle.env.instance.DirectionInternal.UP", false]], "up() (fle.env.entities.position method)": [[6, "fle.env.entities.Position.up", false]], "uranium235 (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Uranium235", false]], "uranium238 (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Uranium238", false]], "uraniumfuelcell (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.UraniumFuelCell", false]], "uraniumore (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.UraniumOre", false]], "uraniumore (fle.env.game_types.resource attribute)": [[7, "fle.env.game_types.Resource.UraniumOre", false]], "uraniumore (fle.env.game_types.resourcename attribute)": [[7, "fle.env.game_types.ResourceName.UraniumOre", false]], "uraniumprocessing (fle.env.game_types.recipename attribute)": [[7, "fle.env.game_types.RecipeName.UraniumProcessing", false]], "utilitysciencepack (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.UtilitySciencePack", false]], "value (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.value", false]], "values() (fle.env.entities.inventory method)": [[6, "fle.env.entities.Inventory.values", false]], "verify() (fle.eval.tasks.defaulttask method)": [[12, "fle.eval.tasks.DefaultTask.verify", false]], "verify() (fle.eval.tasks.taskabc method)": [[12, "fle.eval.tasks.TaskABC.verify", false]], "verify() (fle.eval.tasks.throughputtask method)": [[12, "fle.eval.tasks.ThroughputTask.verify", false]], "verify() (fle.eval.tasks.unboundedthroughputtask method)": [[12, "fle.eval.tasks.UnboundedThroughputTask.verify", false]], "version (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.version", false]], "version_description (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.version_description", false]], "visits (fle.commons.models.program attribute)": [[5, "fle.commons.models.Program.visits", false]], "waiting_for_source_items (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.WAITING_FOR_SOURCE_ITEMS", false]], "waiting_for_space_in_destination (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.WAITING_FOR_SPACE_IN_DESTINATION", false]], "waiting_to_launch_rocket (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.WAITING_TO_LAUNCH_ROCKET", false]], "wallgroup (class in fle.env.entities)": [[6, "fle.env.entities.WallGroup", false]], "warning (fle.env.entities.entityinfo attribute)": [[6, "fle.env.entities.EntityInfo.warning", false]], "warnings (fle.env.entities.entity attribute)": [[6, "fle.env.entities.Entity.warnings", false], [13, "fle.env.entities.Entity.warnings", false]], "water (fle.env.entities.layer attribute)": [[6, "fle.env.entities.Layer.WATER", false]], "water (fle.env.game_types.resource attribute)": [[7, "fle.env.game_types.Resource.Water", false]], "water (fle.env.game_types.resourcename attribute)": [[7, "fle.env.game_types.ResourceName.Water", false]], "west (fle.env.entities.direction attribute)": [[6, "fle.env.entities.Direction.WEST", false]], "west (fle.env.instance.directioninternal attribute)": [[9, "fle.env.instance.DirectionInternal.WEST", false]], "width (fle.env.entities.buildingbox attribute)": [[6, "fle.env.entities.BuildingBox.width", false]], "width (fle.env.entities.dimensions attribute)": [[6, "fle.env.entities.Dimensions.width", false]], "width (fle.env.entities.entity property)": [[6, "fle.env.entities.Entity.width", false], [13, "fle.env.entities.Entity.width", false]], "width (fle.env.game_types.prototype property)": [[7, "fle.env.game_types.Prototype.WIDTH", false]], "width() (fle.env.entities.boundingbox method)": [[6, "fle.env.entities.BoundingBox.width", false]], "wood (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.Wood", false]], "wood (fle.env.game_types.resource attribute)": [[7, "fle.env.game_types.Resource.Wood", false]], "woodenchest (fle.env.game_types.prototype attribute)": [[7, "fle.env.game_types.Prototype.WoodenChest", false]], "working (fle.env.entities.entitystatus attribute)": [[6, "fle.env.entities.EntityStatus.WORKING", false]], "wrap_for_serialization() (in module fle.env.namespace)": [[10, "fle.env.namespace.wrap_for_serialization", false]], "x (fle.env.entities.position attribute)": [[6, "fle.env.entities.Position.x", false]], "y (fle.env.entities.position attribute)": [[6, "fle.env.entities.Position.y", false]]}, "objects": {"fle.agents": [[3, 0, 0, "-", "agent_abc"], [4, 0, 0, "-", "models"]], "fle.agents.agent_abc": [[3, 1, 1, "", "AgentABC"], [3, 4, 1, "", "create_default_agent_card"]], "fle.agents.agent_abc.AgentABC": [[3, 2, 1, "", "__init__"], [3, 2, 1, "", "check_step_completion"], [3, 3, 1, "", "conversation"], [3, 2, 1, "", "end"], [3, 2, 1, "", "get_agent_card"], [3, 3, 1, "", "model"], [3, 2, 1, "", "set_conversation"], [3, 2, 1, "", "step"], [3, 3, 1, "", "system_prompt"]], "fle.agents.models": [[4, 1, 1, "", "CompletionReason"], [4, 1, 1, "", "CompletionResult"], [4, 1, 1, "", "Response"], [4, 1, 1, "", "TaskResponse"]], "fle.agents.models.CompletionReason": [[4, 3, 1, "", "RUNTIME_ERROR"], [4, 3, 1, "", "SUCCESS"], [4, 3, 1, "", "TIMEOUT"]], "fle.agents.models.CompletionResult": [[4, 3, 1, "", "metadata"], [4, 3, 1, "", "model_config"], [4, 3, 1, "", "reason"], [4, 3, 1, "", "step"]], "fle.agents.models.Response": [[4, 3, 1, "", "achievements"], [4, 3, 1, "", "code"], [4, 3, 1, "", "created_at"], [4, 3, 1, "", "error"], [4, 3, 1, "", "flows"], [4, 3, 1, "", "model_config"], [4, 3, 1, "", "program_id"], [4, 3, 1, "", "response"], [4, 3, 1, "", "score"], [4, 3, 1, "", "step"], [4, 3, 1, "", "task"], [4, 3, 1, "", "ticks"]], "fle.agents.models.TaskResponse": [[4, 3, 1, "", "meta"], [4, 3, 1, "", "model_config"], [4, 3, 1, "", "success"]], "fle.commons": [[5, 0, 0, "-", "models"]], "fle.commons.models": [[5, 1, 1, "", "Conversation"], [5, 1, 1, "", "GameState"], [5, 1, 1, "", "GenerationParameters"], [5, 1, 1, "", "Message"], [5, 1, 1, "", "ProductionFlows"], [5, 1, 1, "", "ProfitConfig"], [5, 1, 1, "", "Program"], [5, 1, 1, "", "ResearchState"], [5, 1, 1, "", "SerializableFunction"], [5, 1, 1, "", "TechnologyState"], [5, 1, 1, "", "TimingMetrics"], [5, 4, 1, "", "filter_serializable_vars"]], "fle.commons.models.Conversation": [[5, 2, 1, "", "add_agent_message"], [5, 2, 1, "", "add_result"], [5, 2, 1, "", "add_user_message"], [5, 3, 1, "", "messages"], [5, 3, 1, "", "model_config"], [5, 2, 1, "", "parse_raw"], [5, 2, 1, "", "set_system_message"]], "fle.commons.models.GameState": [[5, 2, 1, "", "__init__"], [5, 3, 1, "", "agent_messages"], [5, 3, 1, "", "entities"], [5, 2, 1, "", "from_instance"], [5, 3, 1, "", "inventories"], [5, 5, 1, "", "is_multiagent"], [5, 3, 1, "", "namespaces"], [5, 5, 1, "", "num_agents"], [5, 2, 1, "", "parse"], [5, 2, 1, "", "parse_agent_messages"], [5, 2, 1, "", "parse_raw"], [5, 3, 1, "", "research"], [5, 3, 1, "", "timestamp"], [5, 2, 1, "", "to_instance"], [5, 2, 1, "", "to_raw"]], "fle.commons.models.GenerationParameters": [[5, 3, 1, "", "frequency_penalty"], [5, 3, 1, "", "logit_bias"], [5, 3, 1, "", "max_tokens"], [5, 3, 1, "", "model"], [5, 3, 1, "", "model_config"], [5, 3, 1, "", "n"], [5, 3, 1, "", "presence_penalty"], [5, 3, 1, "", "stop_sequences"], [5, 3, 1, "", "temperature"]], "fle.commons.models.Message": [[5, 3, 1, "", "content"], [5, 3, 1, "", "metadata"], [5, 3, 1, "", "model_config"], [5, 3, 1, "", "role"]], "fle.commons.models.ProductionFlows": [[5, 2, 1, "", "__init__"], [5, 3, 1, "", "crafted"], [5, 2, 1, "", "from_dict"], [5, 2, 1, "", "get_new_flows"], [5, 3, 1, "", "harvested"], [5, 3, 1, "", "input"], [5, 2, 1, "", "is_valid"], [5, 3, 1, "", "output"], [5, 3, 1, "", "price_list"], [5, 3, 1, "", "static_items"], [5, 2, 1, "", "to_dict"]], "fle.commons.models.ProfitConfig": [[5, 2, 1, "", "__init__"], [5, 3, 1, "", "dynamic_profit_multiplier"], [5, 3, 1, "", "max_static_unit_profit_cap"]], "fle.commons.models.Program": [[5, 3, 1, "", "achievements"], [5, 3, 1, "", "advantage"], [5, 3, 1, "", "code"], [5, 3, 1, "", "completion_token_usage"], [5, 3, 1, "", "conversation"], [5, 3, 1, "", "created_at"], [5, 3, 1, "", "depth"], [5, 3, 1, "", "flows"], [5, 2, 1, "", "from_row"], [5, 2, 1, "", "get_step"], [5, 2, 1, "", "get_uct"], [5, 3, 1, "", "holdout_value"], [5, 3, 1, "", "id"], [5, 3, 1, "", "instance"], [5, 3, 1, "", "meta"], [5, 3, 1, "", "model"], [5, 3, 1, "", "model_config"], [5, 3, 1, "", "parent_id"], [5, 3, 1, "", "prompt_token_usage"], [5, 3, 1, "", "raw_reward"], [5, 3, 1, "", "response"], [5, 3, 1, "", "state"], [5, 3, 1, "", "ticks"], [5, 3, 1, "", "timing_metrics"], [5, 3, 1, "", "token_usage"], [5, 3, 1, "", "value"], [5, 3, 1, "", "version"], [5, 3, 1, "", "version_description"], [5, 3, 1, "", "visits"]], "fle.commons.models.ResearchState": [[5, 2, 1, "", "__init__"], [5, 3, 1, "", "current_research"], [5, 3, 1, "", "progress"], [5, 3, 1, "", "research_progress"], [5, 3, 1, "", "research_queue"], [5, 3, 1, "", "technologies"]], "fle.commons.models.SerializableFunction": [[5, 2, 1, "", "__call__"], [5, 2, 1, "", "__getstate__"], [5, 2, 1, "", "__init__"], [5, 2, 1, "", "__setstate__"], [5, 2, 1, "", "__str__"], [5, 2, 1, "", "bind"], [5, 2, 1, "", "reconstruct"]], "fle.commons.models.TechnologyState": [[5, 2, 1, "", "__init__"], [5, 3, 1, "", "enabled"], [5, 3, 1, "", "ingredients"], [5, 3, 1, "", "level"], [5, 3, 1, "", "name"], [5, 3, 1, "", "prerequisites"], [5, 3, 1, "", "research_unit_count"], [5, 3, 1, "", "research_unit_energy"], [5, 3, 1, "", "researched"]], "fle.commons.models.TimingMetrics": [[5, 3, 1, "", "children"], [5, 5, 1, "", "duration"], [5, 3, 1, "", "end_time"], [5, 3, 1, "", "metadata"], [5, 3, 1, "", "model_config"], [5, 3, 1, "", "operation_name"], [5, 3, 1, "", "start_time"], [5, 2, 1, "", "to_dict"], [5, 5, 1, "", "total_duration"]], "fle.env": [[6, 0, 0, "-", "entities"], [7, 0, 0, "-", "game_types"], [8, 0, 0, "-", "gym_env"], [9, 0, 0, "-", "instance"], [10, 0, 0, "-", "namespace"]], "fle.env.entities": [[6, 1, 1, "", "Accumulator"], [6, 1, 1, "", "AdvancedAssemblingMachine"], [6, 1, 1, "", "Ammo"], [6, 1, 1, "", "AssemblingMachine"], [6, 1, 1, "", "BeltGroup"], [6, 1, 1, "", "Boiler"], [6, 1, 1, "", "BoundingBox"], [6, 1, 1, "", "BuildingBox"], [6, 1, 1, "", "BurnerInserter"], [6, 1, 1, "", "BurnerMiningDrill"], [6, 1, 1, "", "BurnerType"], [6, 1, 1, "", "ChemicalPlant"], [6, 1, 1, "", "Chest"], [6, 1, 1, "", "Dimensions"], [6, 1, 1, "", "Direction"], [6, 1, 1, "", "Electric"], [6, 1, 1, "", "ElectricFurnace"], [6, 1, 1, "", "ElectricMiningDrill"], [6, 1, 1, "", "ElectricalProducer"], [6, 1, 1, "", "ElectricityGroup"], [6, 1, 1, "", "ElectricityPole"], [6, 1, 1, "", "EnergySource"], [13, 1, 1, "", "Entity"], [6, 1, 1, "", "EntityCore"], [6, 1, 1, "", "EntityGroup"], [6, 1, 1, "", "EntityInfo"], [6, 1, 1, "", "EntityStatus"], [6, 1, 1, "", "FilterInserter"], [6, 1, 1, "", "Filtered"], [6, 1, 1, "", "FluidHandler"], [6, 1, 1, "", "Furnace"], [6, 1, 1, "", "Generator"], [6, 1, 1, "", "GunTurret"], [6, 1, 1, "", "HeatExchanger"], [6, 1, 1, "", "IndexedPosition"], [6, 1, 1, "", "Ingredient"], [6, 1, 1, "", "Inserter"], [6, 1, 1, "", "InspectionResults"], [6, 1, 1, "", "Inventory"], [6, 1, 1, "", "Lab"], [6, 1, 1, "", "Layer"], [6, 1, 1, "", "MiningDrill"], [6, 1, 1, "", "MultiFluidHandler"], [6, 1, 1, "", "OffshorePump"], [6, 1, 1, "", "OilRefinery"], [6, 1, 1, "", "Pipe"], [6, 1, 1, "", "PipeGroup"], [6, 1, 1, "", "Position"], [6, 1, 1, "", "Product"], [6, 1, 1, "", "Pump"], [6, 1, 1, "", "PumpJack"], [6, 1, 1, "", "Rail"], [6, 1, 1, "", "Reactor"], [6, 1, 1, "", "Recipe"], [6, 1, 1, "", "ResourcePatch"], [6, 1, 1, "", "Rocket"], [6, 1, 1, "", "RocketSilo"], [6, 1, 1, "", "SolarPanel"], [6, 1, 1, "", "Splitter"], [6, 1, 1, "", "StaticEntity"], [6, 1, 1, "", "StorageTank"], [6, 1, 1, "", "TileDimensions"], [6, 1, 1, "", "TransportBelt"], [6, 1, 1, "", "UndergroundBelt"], [6, 1, 1, "", "WallGroup"]], "fle.env.entities.Accumulator": [[6, 3, 1, "", "energy_source"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.AdvancedAssemblingMachine": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.Ammo": [[6, 3, 1, "", "magazine_size"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "name"], [6, 3, 1, "", "reload_time"]], "fle.env.entities.AssemblingMachine": [[6, 3, 1, "", "assembling_machine_input"], [6, 3, 1, "", "assembling_machine_modules"], [6, 3, 1, "", "assembling_machine_output"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"], [6, 3, 1, "", "recipe"]], "fle.env.entities.BeltGroup": [[6, 3, 1, "", "belts"], [6, 3, 1, "", "inputs"], [6, 3, 1, "", "inventory"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "name"], [6, 3, 1, "", "outputs"]], "fle.env.entities.Boiler": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"], [6, 3, 1, "", "steam_output_point"]], "fle.env.entities.BoundingBox": [[6, 5, 1, "", "center"], [6, 2, 1, "", "height"], [6, 3, 1, "", "left_bottom"], [6, 3, 1, "", "left_top"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "right_bottom"], [6, 3, 1, "", "right_top"], [6, 2, 1, "", "width"]], "fle.env.entities.BuildingBox": [[6, 3, 1, "", "height"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "width"]], "fle.env.entities.BurnerInserter": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.BurnerMiningDrill": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.BurnerType": [[6, 3, 1, "", "fuel"], [6, 3, 1, "", "model_config"]], "fle.env.entities.ChemicalPlant": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.Chest": [[6, 3, 1, "", "inventory"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.Dimensions": [[6, 3, 1, "", "height"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "width"]], "fle.env.entities.Direction": [[6, 3, 1, "", "DOWN"], [6, 3, 1, "", "EAST"], [6, 3, 1, "", "LEFT"], [6, 3, 1, "", "NORTH"], [6, 3, 1, "", "RIGHT"], [6, 3, 1, "", "SOUTH"], [6, 3, 1, "", "UP"], [6, 3, 1, "", "WEST"], [6, 2, 1, "", "from_string"]], "fle.env.entities.Electric": [[6, 3, 1, "", "electrical_id"], [6, 3, 1, "", "model_config"]], "fle.env.entities.ElectricFurnace": [[6, 3, 1, "", "furnace_result"], [6, 3, 1, "", "furnace_source"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.ElectricMiningDrill": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.ElectricalProducer": [[6, 3, 1, "", "electric_output_flow_limit"], [6, 3, 1, "", "energy_source"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "production"]], "fle.env.entities.ElectricityGroup": [[6, 3, 1, "", "model_config"], [6, 3, 1, "", "name"], [6, 3, 1, "", "poles"]], "fle.env.entities.ElectricityPole": [[6, 3, 1, "", "flow_rate"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.EnergySource": [[6, 3, 1, "", "buffer_capacity"], [6, 3, 1, "", "drain"], [6, 3, 1, "", "input_flow_limit"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "output_flow_limit"]], "fle.env.entities.Entity": [[13, 3, 1, "", "dimensions"], [13, 3, 1, "", "energy"], [13, 3, 1, "", "health"], [13, 5, 1, "", "height"], [13, 3, 1, "", "id"], [13, 3, 1, "", "model_config"], [13, 3, 1, "", "prototype"], [13, 3, 1, "", "status"], [13, 3, 1, "", "tile_dimensions"], [13, 3, 1, "", "type"], [13, 3, 1, "", "warnings"], [13, 5, 1, "", "width"]], "fle.env.entities.EntityCore": [[6, 3, 1, "", "direction"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "name"], [6, 3, 1, "", "position"]], "fle.env.entities.EntityGroup": [[6, 3, 1, "", "id"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "name"], [6, 3, 1, "", "position"], [6, 3, 1, "", "status"]], "fle.env.entities.EntityInfo": [[6, 3, 1, "", "contents"], [6, 3, 1, "", "direction"], [6, 3, 1, "", "end_position"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "name"], [6, 3, 1, "", "position"], [6, 3, 1, "", "quantity"], [6, 3, 1, "", "start_position"], [6, 3, 1, "", "status"], [6, 3, 1, "", "warning"]], "fle.env.entities.EntityStatus": [[6, 3, 1, "", "CHARGING"], [6, 3, 1, "", "DISCHARGING"], [6, 3, 1, "", "EMPTY"], [6, 3, 1, "", "FLUID_INGREDIENT_SHORTAGE"], [6, 3, 1, "", "FULLY_CHARGED"], [6, 3, 1, "", "FULL_BURNT_RESULT_OUTPUT"], [6, 3, 1, "", "FULL_OUTPUT"], [6, 3, 1, "", "ITEM_INGREDIENT_SHORTAGE"], [6, 3, 1, "", "LAUNCHING_ROCKET"], [6, 3, 1, "", "LOW_INPUT_FLUID"], [6, 3, 1, "", "LOW_POWER"], [6, 3, 1, "", "LOW_TEMPERATURE"], [6, 3, 1, "", "MISSING_REQUIRED_FLUID"], [6, 3, 1, "", "MISSING_SCIENCE_PACKS"], [6, 3, 1, "", "NORMAL"], [6, 3, 1, "", "NOT_CONNECTED"], [6, 3, 1, "", "NOT_CONNECTED_TO_RAIL"], [6, 3, 1, "", "NOT_PLUGGED_IN_ELECTRIC_NETWORK"], [6, 3, 1, "", "NO_AMMO"], [6, 3, 1, "", "NO_FUEL"], [6, 3, 1, "", "NO_INGREDIENTS"], [6, 3, 1, "", "NO_INPUT_FLUID"], [6, 3, 1, "", "NO_MINABLE_RESOURCES"], [6, 3, 1, "", "NO_POWER"], [6, 3, 1, "", "NO_RECIPE"], [6, 3, 1, "", "NO_RESEARCH_IN_PROGRESS"], [6, 3, 1, "", "PREPARING_ROCKET_FOR_LAUNCH"], [6, 3, 1, "", "WAITING_FOR_SOURCE_ITEMS"], [6, 3, 1, "", "WAITING_FOR_SPACE_IN_DESTINATION"], [6, 3, 1, "", "WAITING_TO_LAUNCH_ROCKET"], [6, 3, 1, "", "WORKING"], [6, 2, 1, "", "from_int"], [6, 2, 1, "", "from_string"]], "fle.env.entities.FilterInserter": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.Filtered": [[6, 3, 1, "", "filter"], [6, 3, 1, "", "model_config"]], "fle.env.entities.FluidHandler": [[6, 3, 1, "", "connection_points"], [6, 3, 1, "", "fluid_box"], [6, 3, 1, "", "fluid_systems"], [6, 3, 1, "", "model_config"]], "fle.env.entities.Furnace": [[6, 3, 1, "", "furnace_result"], [6, 3, 1, "", "furnace_source"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.Generator": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.GunTurret": [[6, 3, 1, "", "kills"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"], [6, 3, 1, "", "turret_ammo"]], "fle.env.entities.HeatExchanger": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.IndexedPosition": [[6, 2, 1, "", "__init__"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "type"]], "fle.env.entities.Ingredient": [[6, 3, 1, "", "count"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "name"], [6, 3, 1, "", "type"]], "fle.env.entities.Inserter": [[6, 3, 1, "", "drop_position"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"], [6, 3, 1, "", "pickup_position"]], "fle.env.entities.InspectionResults": [[6, 3, 1, "", "entities"], [6, 2, 1, "", "get_entities"], [6, 2, 1, "", "get_entity"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "player_position"], [6, 3, 1, "", "radius"], [6, 3, 1, "", "time_elapsed"]], "fle.env.entities.Inventory": [[6, 2, 1, "", "get"], [6, 2, 1, "", "items"], [6, 2, 1, "", "keys"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "serialize_model"], [6, 2, 1, "", "values"]], "fle.env.entities.Lab": [[6, 3, 1, "", "lab_input"], [6, 3, 1, "", "lab_modules"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"], [6, 3, 1, "", "research"]], "fle.env.entities.Layer": [[6, 3, 1, "", "ALL"], [6, 3, 1, "", "CONNECTIONS"], [6, 3, 1, "", "ELECTRICITY"], [6, 3, 1, "", "ENTITIES"], [6, 3, 1, "", "GRID"], [6, 3, 1, "", "LABELS"], [6, 3, 1, "", "NATURAL"], [6, 3, 1, "", "NONE"], [6, 3, 1, "", "ORIGIN"], [6, 3, 1, "", "PLAYER"], [6, 3, 1, "", "RESOURCES"], [6, 3, 1, "", "ROCKS"], [6, 3, 1, "", "TREES"], [6, 3, 1, "", "WATER"]], "fle.env.entities.MiningDrill": [[6, 3, 1, "", "drop_position"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "resources"]], "fle.env.entities.MultiFluidHandler": [[6, 3, 1, "", "fluid_box"], [6, 3, 1, "", "fluid_systems"], [6, 3, 1, "", "input_connection_points"], [6, 3, 1, "", "input_fluids"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "output_connection_points"], [6, 3, 1, "", "output_fluids"]], "fle.env.entities.OffshorePump": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.OilRefinery": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.Pipe": [[6, 3, 1, "", "contents"], [6, 3, 1, "", "flow_rate"], [6, 3, 1, "", "fluid"], [6, 3, 1, "", "fluidbox_id"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.PipeGroup": [[6, 3, 1, "", "model_config"], [6, 3, 1, "", "name"], [6, 3, 1, "", "pipes"]], "fle.env.entities.Position": [[6, 2, 1, "", "__init__"], [6, 2, 1, "", "above"], [6, 2, 1, "", "below"], [6, 2, 1, "", "distance"], [6, 2, 1, "", "down"], [6, 2, 1, "", "is_close"], [6, 2, 1, "", "left"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "parse_args"], [6, 2, 1, "", "right"], [6, 2, 1, "", "to_bounding_box"], [6, 2, 1, "", "up"], [6, 3, 1, "", "x"], [6, 3, 1, "", "y"]], "fle.env.entities.Product": [[6, 3, 1, "", "model_config"], [6, 3, 1, "", "probability"]], "fle.env.entities.Pump": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.PumpJack": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.Rail": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.Reactor": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.Recipe": [[6, 3, 1, "", "category"], [6, 3, 1, "", "enabled"], [6, 3, 1, "", "energy"], [6, 3, 1, "", "ingredients"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "name"], [6, 3, 1, "", "products"]], "fle.env.entities.ResourcePatch": [[6, 3, 1, "", "bounding_box"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "name"], [6, 3, 1, "", "size"]], "fle.env.entities.Rocket": [[6, 3, 1, "", "launch_progress"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "payload"]], "fle.env.entities.RocketSilo": [[6, 3, 1, "", "launch_count"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"], [6, 3, 1, "", "rocket_inventory"], [6, 3, 1, "", "rocket_parts"], [6, 3, 1, "", "rocket_progress"]], "fle.env.entities.SolarPanel": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.Splitter": [[6, 3, 1, "", "input_positions"], [6, 3, 1, "", "inventory"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"], [6, 3, 1, "", "output_positions"]], "fle.env.entities.StaticEntity": [[6, 3, 1, "", "model_config"], [6, 3, 1, "", "neighbours"]], "fle.env.entities.StorageTank": [[6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.TileDimensions": [[6, 3, 1, "", "model_config"], [6, 3, 1, "", "tile_height"], [6, 3, 1, "", "tile_width"]], "fle.env.entities.TransportBelt": [[6, 3, 1, "", "input_position"], [6, 3, 1, "", "inventory"], [6, 3, 1, "", "is_source"], [6, 3, 1, "", "is_terminus"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"], [6, 3, 1, "", "output_position"]], "fle.env.entities.UndergroundBelt": [[6, 3, 1, "", "connected_to"], [6, 3, 1, "", "is_input"], [6, 3, 1, "", "model_config"], [6, 2, 1, "", "model_post_init"]], "fle.env.entities.WallGroup": [[6, 3, 1, "", "entities"], [6, 3, 1, "", "model_config"], [6, 3, 1, "", "name"]], "fle.env.game_types": [[7, 1, 1, "", "Prototype"], [7, 1, 1, "", "PrototypeMetaclass"], [7, 1, 1, "", "RecipeName"], [7, 1, 1, "", "Resource"], [7, 1, 1, "", "ResourceName"], [7, 1, 1, "", "Technology"]], "fle.env.game_types.Prototype": [[7, 3, 1, "", "Accumulator"], [7, 3, 1, "", "AdvancedCircuit"], [7, 3, 1, "", "AdvancedOilProcessing"], [7, 3, 1, "", "AssemblingMachine1"], [7, 3, 1, "", "AssemblingMachine2"], [7, 3, 1, "", "AssemblingMachine3"], [7, 3, 1, "", "AutomationSciencePack"], [7, 3, 1, "", "Battery"], [7, 3, 1, "", "BeltGroup"], [7, 3, 1, "", "BigElectricPole"], [7, 3, 1, "", "Boiler"], [7, 3, 1, "", "BurnerInserter"], [7, 3, 1, "", "BurnerMiningDrill"], [7, 3, 1, "", "Centrifuge"], [7, 3, 1, "", "ChemicalPlant"], [7, 3, 1, "", "ChemicalSciencePack"], [7, 3, 1, "", "Coal"], [7, 3, 1, "", "CoalLiquifaction"], [7, 3, 1, "", "Concrete"], [7, 3, 1, "", "CopperCable"], [7, 3, 1, "", "CopperOre"], [7, 3, 1, "", "CopperPlate"], [7, 3, 1, "", "ElectricEngineUnit"], [7, 3, 1, "", "ElectricFurnace"], [7, 3, 1, "", "ElectricMiningDrill"], [7, 3, 1, "", "ElectricityGroup"], [7, 3, 1, "", "ElectronicCircuit"], [7, 3, 1, "", "EmptyBarrel"], [7, 3, 1, "", "EngineUnit"], [7, 3, 1, "", "ExpressInserter"], [7, 3, 1, "", "ExpressSplitter"], [7, 3, 1, "", "ExpressTransportBelt"], [7, 3, 1, "", "ExpressUndergroundBelt"], [7, 3, 1, "", "FastInserter"], [7, 3, 1, "", "FastSplitter"], [7, 3, 1, "", "FastTransportBelt"], [7, 3, 1, "", "FastUndergroundBelt"], [7, 3, 1, "", "FilterInserter"], [7, 3, 1, "", "FirearmMagazine"], [7, 3, 1, "", "FlyingRobotFrame"], [7, 3, 1, "", "Gate"], [7, 3, 1, "", "Grenade"], [7, 3, 1, "", "GunTurret"], [7, 5, 1, "", "HEIGHT"], [7, 3, 1, "", "HeatExchanger"], [7, 3, 1, "", "HeatPipe"], [7, 3, 1, "", "HeavyOil"], [7, 3, 1, "", "Inserter"], [7, 3, 1, "", "IronChest"], [7, 3, 1, "", "IronGearWheel"], [7, 3, 1, "", "IronOre"], [7, 3, 1, "", "IronPlate"], [7, 3, 1, "", "IronStick"], [7, 3, 1, "", "Lab"], [7, 3, 1, "", "LightOil"], [7, 3, 1, "", "LogisticsSciencePack"], [7, 3, 1, "", "LongHandedInserter"], [7, 3, 1, "", "LowDensityStructure"], [7, 3, 1, "", "Lubricant"], [7, 3, 1, "", "MediumElectricPole"], [7, 3, 1, "", "MilitarySciencePack"], [7, 3, 1, "", "NuclearReactor"], [7, 3, 1, "", "OffshorePump"], [7, 3, 1, "", "OilRefinery"], [7, 3, 1, "", "PetroleumGas"], [7, 3, 1, "", "PiercingRoundsMagazine"], [7, 3, 1, "", "Pipe"], [7, 3, 1, "", "PipeGroup"], [7, 3, 1, "", "PlasticBar"], [7, 3, 1, "", "ProcessingUnit"], [7, 3, 1, "", "ProductionSciencePack"], [7, 3, 1, "", "ProductivityModule"], [7, 3, 1, "", "ProductivityModule2"], [7, 3, 1, "", "ProductivityModule3"], [7, 3, 1, "", "Pump"], [7, 3, 1, "", "PumpJack"], [7, 3, 1, "", "Radar"], [7, 3, 1, "", "Rail"], [7, 3, 1, "", "Rocket"], [7, 3, 1, "", "RocketControlUnit"], [7, 3, 1, "", "RocketFuel"], [7, 3, 1, "", "RocketPart"], [7, 3, 1, "", "RocketSilo"], [7, 3, 1, "", "Satellite"], [7, 3, 1, "", "SmallElectricPole"], [7, 3, 1, "", "SmallLamp"], [7, 3, 1, "", "SolarPanel"], [7, 3, 1, "", "SolidFuel"], [7, 3, 1, "", "SpaceSciencePack"], [7, 3, 1, "", "Splitter"], [7, 3, 1, "", "StackFilterInserter"], [7, 3, 1, "", "StackInserter"], [7, 3, 1, "", "SteamEngine"], [7, 3, 1, "", "SteelChest"], [7, 3, 1, "", "SteelFurnace"], [7, 3, 1, "", "SteelPlate"], [7, 3, 1, "", "Stone"], [7, 3, 1, "", "StoneBrick"], [7, 3, 1, "", "StoneFurnace"], [7, 3, 1, "", "StoneWall"], [7, 3, 1, "", "StorageTank"], [7, 3, 1, "", "Sulfur"], [7, 3, 1, "", "SulfuricAcid"], [7, 3, 1, "", "TransportBelt"], [7, 3, 1, "", "UndergroundBelt"], [7, 3, 1, "", "UndergroundPipe"], [7, 3, 1, "", "Uranium235"], [7, 3, 1, "", "Uranium238"], [7, 3, 1, "", "UraniumFuelCell"], [7, 3, 1, "", "UraniumOre"], [7, 3, 1, "", "UtilitySciencePack"], [7, 5, 1, "", "WIDTH"], [7, 3, 1, "", "Wood"], [7, 3, 1, "", "WoodenChest"], [7, 2, 1, "", "__init__"]], "fle.env.game_types.RecipeName": [[7, 3, 1, "", "AdvancedOilProcessing"], [7, 3, 1, "", "BasicOilProcessing"], [7, 3, 1, "", "CoalLiquefaction"], [7, 3, 1, "", "EmptyCrudeOilBarrel"], [7, 3, 1, "", "EmptyHeavyOilBarrel"], [7, 3, 1, "", "EmptyLightOilBarrel"], [7, 3, 1, "", "EmptyLubricantBarrel"], [7, 3, 1, "", "EmptyPetroleumGasBarrel"], [7, 3, 1, "", "EmptySulfuricAcidBarrel"], [7, 3, 1, "", "EmptyWaterBarrel"], [7, 3, 1, "", "FillCrudeOilBarrel"], [7, 3, 1, "", "FillHeavyOilBarrel"], [7, 3, 1, "", "FillLightOilBarrel"], [7, 3, 1, "", "FillLubricantBarrel"], [7, 3, 1, "", "FillPetroleumGasBarrel"], [7, 3, 1, "", "FillSulfuricAcidBarrel"], [7, 3, 1, "", "FillWaterBarrel"], [7, 3, 1, "", "HeavyOilCracking"], [7, 3, 1, "", "LightOilCracking"], [7, 3, 1, "", "NuclearFuelReprocessing"], [7, 3, 1, "", "SolidFuelFromHeavyOil"], [7, 3, 1, "", "SolidFuelFromLightOil"], [7, 3, 1, "", "SolidFuelFromPetroleumGas"], [7, 3, 1, "", "SulfuricAcid"], [7, 3, 1, "", "UraniumProcessing"]], "fle.env.game_types.Resource": [[7, 3, 1, "", "Coal"], [7, 3, 1, "", "CopperOre"], [7, 3, 1, "", "CrudeOil"], [7, 3, 1, "", "IronOre"], [7, 3, 1, "", "Stone"], [7, 3, 1, "", "UraniumOre"], [7, 3, 1, "", "Water"], [7, 3, 1, "", "Wood"]], "fle.env.game_types.ResourceName": [[7, 3, 1, "", "Coal"], [7, 3, 1, "", "CopperOre"], [7, 3, 1, "", "CrudeOil"], [7, 3, 1, "", "IronOre"], [7, 3, 1, "", "Stone"], [7, 3, 1, "", "UraniumOre"], [7, 3, 1, "", "Water"]], "fle.env.game_types.Technology": [[7, 3, 1, "", "AdvancedElectronics"], [7, 3, 1, "", "AdvancedElectronics2"], [7, 3, 1, "", "AdvancedMaterialProcessing"], [7, 3, 1, "", "AdvancedMaterialProcessing2"], [7, 3, 1, "", "AdvancedOilProcessing"], [7, 3, 1, "", "Automation"], [7, 3, 1, "", "Automation2"], [7, 3, 1, "", "Automation3"], [7, 3, 1, "", "BarrelFilling"], [7, 3, 1, "", "BatteryTechnology"], [7, 3, 1, "", "CharacterInventorySlots"], [7, 3, 1, "", "ChemicalSciencePack"], [7, 3, 1, "", "ElectricEnergy"], [7, 3, 1, "", "ElectricEnergy2"], [7, 3, 1, "", "ElectricEngineering"], [7, 3, 1, "", "Electronics"], [7, 3, 1, "", "EnergyShield"], [7, 3, 1, "", "EnergyShield2"], [7, 3, 1, "", "FastInserter"], [7, 3, 1, "", "Grenades"], [7, 3, 1, "", "Landfill"], [7, 3, 1, "", "Logistics"], [7, 3, 1, "", "Logistics2"], [7, 3, 1, "", "Logistics3"], [7, 3, 1, "", "LogisticsSciencePack"], [7, 3, 1, "", "LowDensityStructure"], [7, 3, 1, "", "Lubricant"], [7, 3, 1, "", "MilitaryScience"], [7, 3, 1, "", "MilitarySciencePack"], [7, 3, 1, "", "ModularArmor"], [7, 3, 1, "", "NightVision"], [7, 3, 1, "", "NuclearPower"], [7, 3, 1, "", "OilProcessing"], [7, 3, 1, "", "Plastics"], [7, 3, 1, "", "PowerArmor"], [7, 3, 1, "", "PowerArmor2"], [7, 3, 1, "", "ProductionSciencePack"], [7, 3, 1, "", "ProductivityModule"], [7, 3, 1, "", "ProductivityModule2"], [7, 3, 1, "", "ProductivityModule3"], [7, 3, 1, "", "RailwayTransportation"], [7, 3, 1, "", "ResearchSpeed"], [7, 3, 1, "", "Robotics"], [7, 3, 1, "", "RocketControl"], [7, 3, 1, "", "RocketFuel"], [7, 3, 1, "", "RocketSiloTechnology"], [7, 3, 1, "", "SolarEnergy"], [7, 3, 1, "", "SpaceScience"], [7, 3, 1, "", "StackInserter"], [7, 3, 1, "", "StackInserterCapacity1"], [7, 3, 1, "", "StackInserterCapacity2"], [7, 3, 1, "", "SteelProcessing"], [7, 3, 1, "", "StorageTanks"], [7, 3, 1, "", "SulfurProcessing"]], "fle.env.gym_env.action": [[0, 1, 1, "", "Action"]], "fle.env.gym_env.action.Action": [[0, 2, 1, "", "__init__"], [0, 3, 1, "", "agent_idx"], [0, 3, 1, "", "code"], [0, 3, 1, "", "game_state"], [0, 2, 1, "", "to_dict"]], "fle.env.gym_env.registry": [[1, 4, 1, "", "get_environment_info"], [1, 4, 1, "", "list_available_environments"], [1, 4, 1, "", "register_all_environments"]], "fle.env.instance": [[9, 1, 1, "", "DirectionInternal"], [1, 1, 1, "", "FactorioInstance"], [9, 1, 1, "", "GameControl"]], "fle.env.instance.DirectionInternal": [[9, 3, 1, "", "DOWN"], [9, 3, 1, "", "EAST"], [9, 3, 1, "", "LEFT"], [9, 3, 1, "", "NORTH"], [9, 3, 1, "", "RIGHT"], [9, 3, 1, "", "SOUTH"], [9, 3, 1, "", "UP"], [9, 3, 1, "", "WEST"], [9, 2, 1, "", "from_factorio_direction"], [9, 2, 1, "", "next_clockwise"], [9, 2, 1, "", "next_counterclockwise"], [9, 2, 1, "", "opposite"], [9, 2, 1, "", "to_factorio_direction"]], "fle.env.instance.FactorioInstance": [[1, 2, 1, "", "__init__"], [1, 2, 1, "", "cleanup"], [1, 2, 1, "", "connect_to_server"], [1, 2, 1, "", "eval"], [1, 2, 1, "", "eval_with_error"], [1, 5, 1, "", "first_namespace"], [1, 2, 1, "", "get_elapsed_ticks"], [1, 2, 1, "", "get_speed"], [1, 2, 1, "", "get_system_prompt"], [1, 2, 1, "", "get_warnings"], [1, 2, 1, "", "initialise"], [1, 5, 1, "", "is_multiagent"], [1, 5, 1, "", "namespace"], [1, 3, 1, "", "namespace_class"], [1, 2, 1, "", "pause"], [1, 2, 1, "id0", "reset"], [1, 2, 1, "", "set_speed"], [1, 2, 1, "", "set_speed_and_unpause"], [1, 2, 1, "", "unpause"]], "fle.env.instance.GameControl": [[9, 2, 1, "", "__init__"], [9, 2, 1, "", "get_elapsed_ticks"], [9, 2, 1, "", "get_speed"], [9, 2, 1, "", "is_paused"], [9, 2, 1, "", "pause"], [9, 2, 1, "", "pause_at_speed"], [9, 2, 1, "", "reset_to_defaults"], [9, 2, 1, "", "set_speed"], [9, 2, 1, "", "set_speed_and_unpause"], [9, 2, 1, "", "unpause"]], "fle.env.namespace": [[10, 1, 1, "", "FactorioNamespace"], [10, 1, 1, "", "LoopContext"], [10, 4, 1, "", "unwrap_after_deserialization"], [10, 4, 1, "", "wrap_for_serialization"]], "fle.env.namespace.FactorioNamespace": [[10, 2, 1, "", "__init__"], [10, 2, 1, "", "eval_with_timeout"], [10, 2, 1, "", "execute_body"], [10, 2, 1, "", "execute_node"], [10, 2, 1, "", "get_functions"], [10, 2, 1, "", "get_messages"], [10, 2, 1, "", "load"], [10, 2, 1, "", "load_messages"], [10, 2, 1, "", "log"], [10, 2, 1, "", "reset"]], "fle.env.namespace.LoopContext": [[10, 2, 1, "", "__init__"], [10, 2, 1, "", "enter_loop"], [10, 2, 1, "", "exit_loop"], [10, 2, 1, "", "handle_break"], [10, 2, 1, "", "handle_continue"]], "fle.eval": [[11, 0, 0, "-", "algorithms"], [12, 0, 0, "-", "tasks"]], "fle.eval.tasks": [[12, 1, 1, "", "DefaultTask"], [12, 1, 1, "", "TaskABC"], [12, 1, 1, "", "TaskFactory"], [12, 1, 1, "", "ThroughputTask"], [12, 1, 1, "", "UnboundedThroughputTask"]], "fle.eval.tasks.DefaultTask": [[12, 2, 1, "", "__init__"], [12, 2, 1, "", "setup_instance"], [12, 2, 1, "", "verify"]], "fle.eval.tasks.TaskABC": [[12, 2, 1, "", "__init__"], [12, 2, 1, "", "enhance_response_with_task_output"], [12, 2, 1, "", "get_agent_instructions"], [12, 2, 1, "", "setup"], [12, 2, 1, "", "setup_instance"], [12, 2, 1, "", "verify"]], "fle.eval.tasks.TaskFactory": [[12, 2, 1, "", "__init__"], [12, 2, 1, "", "create_task"]], "fle.eval.tasks.ThroughputTask": [[12, 2, 1, "", "__init__"], [12, 2, 1, "", "enhance_response_with_task_output"], [12, 2, 1, "", "setup_instance"], [12, 2, 1, "", "verify"]], "fle.eval.tasks.UnboundedThroughputTask": [[12, 2, 1, "", "__init__"], [12, 2, 1, "", "enhance_response_with_task_output"], [12, 2, 1, "", "setup_instance"], [12, 2, 1, "", "verify"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "function", "Python function"], "5": ["py", "property", "Python property"]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:attribute", "4": "py:function", "5": "py:property"}, "terms": {"": [3, 6, 14, 15, 17, 18, 26, 29], "0": [0, 1, 5, 6, 9, 12, 13, 15, 16, 17, 18, 19, 20, 21, 24, 26, 29, 30], "00": 16, "00z": 16, "01": 16, "01t00": 16, "01t01": 16, "02": 19, "05": [19, 20], "1": [0, 1, 5, 6, 7, 9, 13, 15, 16, 17, 18, 19, 20, 21, 23, 24, 26, 28], "10": [0, 1, 5, 9, 15, 16, 18, 19, 20, 21, 23, 24, 26, 27, 28, 30], "100": [12, 15, 17, 18, 19, 20, 21], "1000": [13, 15, 17, 19, 20, 21], "10000": [0, 17], "1000000": 0, "1024": [6, 21], "110": [18, 23], "128": [6, 21], "139": 21, "15": [14, 16, 19], "150": [13, 16], "16": [1, 6, 13, 17, 19], "19": 21, "2": [6, 7, 9, 13, 16, 19, 20, 21, 23, 24], "20": [18, 19, 20, 21, 27, 30], "200": [18, 21], "2000": [17, 19, 20, 21], "2024": 16, "2047": 6, "215": 21, "235": 7, "238": 7, "24": [1, 6, 22], "250": 1, "255": 21, "256": [6, 21], "264": 21, "2666": 24, "27": [13, 19, 24], "27000": [1, 9], "28": [13, 19, 24], "2d": 21, "3": [7, 13, 14, 16, 18, 19, 20, 21, 23, 24], "30": [16, 19, 20, 30], "300": 21, "30000": 24, "32": 6, "34197": 23, "3600": 17, "4": [6, 9, 13, 19, 24], "400": 21, "41": 5, "42": 18, "45": 19, "5": [5, 6, 13, 15, 19, 20, 21, 24], "50": [12, 17, 28], "500": [14, 17], "5000": 17, "512": [6, 21], "520": 21, "5432": 16, "59": [13, 19, 24], "6": [6, 9, 19, 21], "60": [1, 9, 12, 17], "61": [13, 19, 24], "64": 6, "65": 21, "6666666667": 24, "67": 13, "69": 21, "7": [20, 21], "70": [20, 21], "75": [13, 19, 20, 21, 24], "8": [6, 15, 19, 20, 21], "80": [20, 21], "85": [20, 21], "9": 21, "90": [20, 21], "95": [19, 20], "A": [3, 6, 17], "For": [0, 16, 22, 23], "If": [1, 29], "It": [6, 29, 30], "No": [18, 19, 23], "Not": [26, 28, 29, 30], "Or": 12, "The": [0, 1, 3, 6, 9, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 26, 28, 29, 30], "These": [1, 9], "To": 23, "With": [18, 23, 30], "_": [15, 18, 20], "__call__": [5, 14, 18], "__getstate__": 5, "__init__": [0, 1, 3, 5, 6, 7, 9, 10, 12, 15, 17, 19, 20, 21], "__setstate__": 5, "__str__": 5, "_analyze_connect": 21, "_analyze_visual_data": 21, "_calculate_density_map": 21, "_classify_ent": 21, "_classify_resourc": 21, "_default_construction_behavior": 20, "_default_research_behavior": 20, "_default_resource_behavior": 20, "_detect_ent": 21, "_detect_resource_patch": 21, "_estimate_resource_s": 21, "_extract_dominant_color": 21, "_extract_spatial_featur": 21, "_generate_action_cod": 15, "_handle_collection_task": 20, "_handle_coordination_request": 20, "_handle_infrastructure_task": 20, "_handle_research_plan": 20, "_handle_resource_request": 20, "_handle_task_complet": 20, "_initial_coordin": 20, "_initial_setup": 19, "_initial_visual_explor": 21, "_initialize_ag": 20, "_is_entity_pixel": 21, "_is_resource_region": 21, "_monitor_and_optim": 19, "_monitor_min": 15, "_monitoring_and_optim": 20, "_multiplayer_": 23, "_must_": 14, "_process_messag": 20, "_setup_min": [15, 19], "_task_distribut": 20, "_tools_": 14, "_visual_monitor": 21, "_visual_setup": 21, "a2a": 3, "abl": 24, "about": [0, 1, 12, 13, 16, 24, 30], "abov": 6, "absolut": 6, "abstract": [3, 15, 24], "accept": [6, 26, 28], "access": [0, 1, 16], "account": [26, 28, 29], "accru": 10, "accumul": [2, 6, 7], "accuraci": 21, "achiev": [4, 5, 12, 17], "acid": [6, 7], "across": [1, 15, 21, 22], "act": [15, 19, 20, 21, 24], "action": [1, 9, 13, 14, 15, 16, 18, 19, 20, 21, 24, 25], "action1": 16, "action2": 16, "action3": 16, "action_0": 0, "action_1": 0, "activ": 23, "actual": [0, 26, 28], "adapt": [14, 15, 17], "add": [0, 5, 12, 14, 19, 21, 23, 24, 26], "add_agent_messag": 5, "add_result": 5, "add_user_messag": 5, "addit": [16, 18, 23], "address": [1, 9, 23], "adjust": [15, 17, 20, 21, 22], "advanc": [7, 14, 19, 20, 21, 23, 25], "advanced_circuit_throughput": 1, "advancedassemblingmachin": [2, 6, 7], "advancedcircuit": 7, "advancedelectron": 7, "advancedelectronics2": 7, "advancedmaterialprocess": 7, "advancedmaterialprocessing2": 7, "advancedoilprocess": 7, "advantag": 5, "affect": [1, 9, 14], "after": [5, 24, 28], "ag": 23, "against": 17, "agent": [1, 9, 10, 12, 13, 14, 16, 17, 18, 22, 23, 24, 25, 26, 28, 29, 30], "agent_abc": [2, 15, 19, 20, 21], "agent_count": 20, "agent_idx": [0, 1, 9, 12, 15, 19, 20, 21], "agent_index": 10, "agent_instruct": 12, "agent_messag": 5, "agent_specialization_effect": 20, "agent_typ": [15, 16, 19, 20, 21], "agentabc": [2, 3], "agentcard": 3, "alert": [1, 9], "algorithm": [2, 15, 20, 21], "alia": [1, 9], "align": 14, "all": [0, 1, 2, 5, 6, 9, 10, 13, 14, 15, 16, 17, 18, 19, 20, 23, 26, 27, 28, 29], "all_technologies_research": [1, 9], "all_technology_reserach": 12, "allow": [1, 6, 13, 17, 18, 22, 26, 28, 29, 30], "also": 6, "alwai": [18, 27, 29, 30], "ammo": [2, 6, 7], "among": 20, "amount": [14, 18], "an": [1, 4, 5, 6, 7, 9, 12, 14, 15, 16, 22, 24, 25, 26, 29, 30], "analysi": [16, 25, 29], "analyz": [14, 15, 20, 21, 29], "ani": [0, 1, 4, 5, 6, 13, 15, 19, 20, 21], "annot": [10, 14], "ant": 23, "anthrop": 23, "anthropic_api_kei": 23, "api": [18, 24], "append": [15, 20, 21], "applic": 29, "approach": 15, "appropri": [17, 18, 26, 30], "ar": [0, 1, 5, 9, 14, 15, 17, 18, 22, 23, 24, 30], "arbitrary_types_allow": [5, 6], "architectur": 25, "area": [14, 18, 19, 30], "arg": [3, 5, 6, 10, 15, 18], "arg1": 14, "arg2": 14, "argument": 6, "armor": 7, "around": [14, 18], "arrai": 21, "assembl": [6, 7, 14, 20], "assembling_machine_input": 6, "assembling_machine_modul": 6, "assembling_machine_output": 6, "assemblingmachin": [2, 6, 7, 13], "assemblingmachine1": 7, "assemblingmachine2": 7, "assemblingmachine3": 7, "assert": [0, 15, 17, 18, 24], "assign": [20, 24], "assmbl": 6, "ast": 10, "async": 3, "attribut": [5, 6, 10], "auto": 14, "autodoc": [], "autom": [0, 7, 13, 16, 17, 19, 20, 24], "automat": [1, 14, 16, 17, 18, 22, 24], "automation2": 7, "automation3": 7, "automation_science_pack_throughput": 1, "automationsciencepack": 7, "avail": [0, 9, 13, 14, 17, 18, 19, 20, 22, 24, 26, 27, 28, 30], "averag": [16, 19, 20], "avg_query_tim": 16, "avoid": 14, "axi": 21, "b": 23, "b64decod": 21, "back": [1, 9, 10, 14], "backend": 16, "background": 21, "backup": 25, "backup_id": 16, "backward": 18, "balanc": 17, "bar": 7, "barrel": [6, 7], "barrelfil": 7, "base": [0, 1, 3, 4, 5, 6, 7, 9, 10, 12, 13, 16, 17, 18, 19, 21, 25], "base64": [13, 21], "basemodel": [4, 5, 6], "basetask": 17, "bash": 23, "basic": [0, 7, 14, 15, 18, 20, 21, 25, 26, 27, 28, 29, 30], "basic_ag": 19, "basic_agent_config": 19, "basic_setup": 20, "basicag": 19, "basicoilprocess": 7, "batch": 16, "batch_save_step": 16, "batteri": [6, 7], "battery_throughput": 1, "batterytechnologi": 7, "been": [1, 9], "befor": [0, 1, 9, 16, 26, 28, 29], "begin": [19, 20], "behav": 6, "behavior": [0, 14, 15, 20, 25], "below": [6, 20], "belt": [6, 7, 13, 14], "beltgroup": [2, 6, 7], "best": [14, 25], "beta": 23, "better": [24, 27], "between": [0, 1, 5, 6, 13, 14, 15, 17, 20, 21, 22, 27], "big": 7, "bigelectricpol": 7, "bind": 5, "black": 21, "block": [0, 10, 23], "bodi": 10, "boiler": [2, 6, 7], "bonu": 7, "bool": [3, 4, 5, 6, 9, 18, 26, 28, 29, 30], "bottleneck": [19, 21], "bottom": 6, "bound": 6, "boundari": 14, "bounding_box": 6, "boundingbox": [2, 6], "box": 6, "branch": 23, "break": [20, 29], "breakdown": 20, "brick": 7, "brown": 21, "buffer_capac": 6, "build": [1, 6, 12, 14, 17, 20, 22, 24, 25, 29, 30], "build_infrastructur": 20, "buildabl": 14, "building_materi": 29, "building_typ": 20, "buildingbox": [2, 6], "built": [20, 24], "burn": 6, "burnabl": 6, "burner": [7, 13, 24, 29], "burnerinsert": [2, 6, 7], "burnerminingdril": [2, 6, 7, 24], "burnertyp": [2, 6], "byte": 5, "bytesio": 21, "cabl": 7, "cach": [16, 18], "cache_script": [1, 9], "calcul": [5, 6, 14, 17], "call": [6, 14, 18], "callabl": [5, 14], "can": [0, 1, 6, 7, 9, 14, 15, 17, 18, 22, 23, 24, 26, 27, 28], "cannot": [6, 26, 28], "capabl": [3, 15, 17, 18, 29], "capac": [7, 28], "captur": [0, 5], "card": 3, "case": [1, 9, 15, 17, 18, 26, 27, 28], "categori": [6, 25], "caught": 0, "caus": [26, 28, 29, 30], "cd": [18, 23], "cell": 7, "center": [6, 18], "center_po": 18, "centrifug": 7, "chain": [0, 19, 24, 27], "challeng": [12, 17], "chang": [10, 14, 17, 21, 26, 28, 29, 30], "charact": 7, "characterinventoryslot": 7, "charg": 6, "check": [3, 5, 9, 14, 15, 16, 17, 18, 19, 20, 21, 22, 26, 27, 28, 29, 30], "check_step_complet": 3, "checkpoint": 16, "chemic": [1, 6, 7, 14], "chemical_science_pack_throughput": 1, "chemicalpl": [2, 6, 7], "chemicalsciencepack": 7, "chest": [0, 2, 6, 7, 13, 14, 15, 19, 20, 21, 24, 26, 27, 28, 29], "children": 5, "choos": [24, 30], "circuit": [1, 7], "circular": 18, "cl": 7, "class": [0, 1, 3, 4, 5, 6, 7, 9, 10, 12, 13, 14, 17, 18, 19, 20, 21, 24, 25], "classdict": 7, "classif": 21, "classmethod": [5, 6, 9], "classvar": [4, 5, 6, 13], "clean": [1, 15], "cleanup": [1, 3, 9, 16], "clear": [15, 17, 18, 20, 26, 27, 30], "clear_ent": [1, 9], "cli": 24, "click": 23, "client": [14, 18, 25], "close": [1, 15, 19, 20, 21], "closest": 14, "cluster": [24, 25], "coal": [7, 13, 15, 17, 19, 20, 24, 28, 29], "coal_po": 19, "coalliquefact": 7, "coalliquifact": 7, "code": [1, 4, 5, 12, 15, 16, 19, 20, 21, 23, 24, 25, 27], "code_lin": 15, "collabor": 20, "collaborative_planning_success": 20, "collect": [14, 15, 18, 19, 20, 27], "collect_": 20, "collect_copper_or": 20, "collect_iron_or": 20, "collected_resourc": 15, "collector": 25, "color": 21, "com": 18, "combin": 27, "command": [19, 20, 21, 22], "common": [0, 1, 9, 14, 16, 19, 25], "commun": [13, 15, 20, 29], "communication_effici": 20, "communication_en": 20, "communication_lat": 20, "compat": [1, 13, 14, 16, 18, 28], "compet": 17, "complet": [2, 3, 5, 12, 13, 14, 15, 16, 17, 18, 20], "completion_token_usag": 5, "completionreason": [2, 4], "completionresult": [2, 4], "complex": [0, 14, 24, 27], "compon": [1, 13, 14, 25], "compos": 22, "comprehens": [0, 1, 14, 17, 18], "compress": 21, "compris": 24, "comput": [21, 24], "computer_vision_model": 21, "concept": 25, "concret": [7, 15], "condit": [0, 12, 17, 27], "confid": 21, "config": [4, 5, 6, 13, 15, 17, 19, 20, 21, 22, 24], "configdict": [4, 5, 6, 13], "configur": [1, 4, 5, 6, 9, 13, 14, 24, 25], "confirm": 23, "conflict": [15, 18, 20, 30], "conflict_resolut": 20, "conflict_resolution_success": 20, "conform": [4, 5, 6, 13], "connect": [1, 6, 16, 21, 22, 23], "connect_ent": [14, 27], "connect_to_serv": [1, 9], "connected_to": 6, "connection_count": 16, "connection_point": 6, "connection_timeout": 16, "consid": [16, 18], "constraint": 17, "construct": [17, 20, 24], "construction_queu": 20, "construction_specialist": 20, "constructionspecialist": 20, "consumpt": [15, 17, 19], "contain": [1, 2, 3, 5, 12, 13, 14, 22, 26, 27, 28, 29, 30], "content": [5, 6, 14, 20, 26, 28, 29], "context": [0, 3, 6, 14, 24], "continu": 1, "control": [0, 5, 7, 10, 16], "convers": [2, 3, 5], "convert": [0, 1, 5, 6, 9, 17, 21], "conveyor": [6, 13], "coordin": [0, 6, 14, 15, 17, 18, 20], "coordination_effect": 20, "coordination_effici": 20, "coordination_en": 20, "coordination_request": 20, "coordination_start": 20, "copper": [7, 15, 19, 20, 29], "copper_or": [17, 19, 20, 21], "copper_po": [19, 20, 21], "copperc": 7, "copperor": 7, "copperpl": 7, "core": [5, 6, 23, 25], "correctli": [21, 30], "corrupt": 16, "cost": 17, "count": [6, 13, 14, 15, 16, 17, 18, 19, 24, 26, 28, 29], "cpu": 21, "cpu_util": 21, "crack": 7, "craft": [5, 6, 13], "craft_item": 14, "creat": [0, 1, 3, 5, 6, 12, 15, 16, 19, 20, 21, 22, 24, 25, 27], "create_backup": 16, "create_default_agent_card": [2, 3], "create_task": 12, "created_at": [4, 5], "creation": [1, 17], "criteria": [15, 17], "crude": [6, 7], "crude_oil_throughput": 1, "crudeoil": 7, "cue": 21, "current": [0, 1, 3, 5, 9, 12, 13, 15, 16, 17, 19, 20, 21], "current_research": 5, "current_tim": 17, "current_typ": 20, "current_vers": 16, "custom": [1, 12, 16, 22, 27], "d": 16, "dai": 6, "data": [1, 4, 5, 6, 13, 16, 18, 21, 22, 24, 27], "databas": [23, 25], "databasecli": 16, "dataset": 16, "datetim": [4, 5], "db": 16, "db_client": 16, "debug": [0, 19, 24], "debug_mod": 19, "decis": [13, 15, 19, 20], "declar": 3, "decod": 21, "def": [0, 15, 17, 18, 19, 20, 21], "default": [3, 6, 9, 16, 18, 20, 23, 26, 28, 30], "defaulttask": [2, 12], "defin": [0, 1, 10, 12, 15, 17, 18, 20, 24], "definit": [1, 9, 12, 25], "delet": 10, "deliv": 20, "deliveri": 20, "demonstr": [19, 20, 21], "deni": 29, "densiti": 7, "density_map": 21, "depend": [17, 18, 24], "deploy": 16, "deposit": 14, "depth": 5, "describ": [3, 18], "descript": [0, 14, 17, 18, 27], "design": [15, 18, 20], "desir": [14, 24], "detail": [0, 1, 13, 14, 19, 22, 24, 27], "detect": 21, "develop": [16, 21, 25], "devic": [6, 13], "dialogu": 5, "dict": [0, 1, 4, 5, 6, 10, 12, 15, 18, 19, 20, 21], "dictionari": [0, 4, 5, 6, 12, 13, 18, 26, 28, 29, 30], "differ": [6, 20, 22, 28, 30], "difficulti": 17, "dimens": [2, 6, 13, 14], "direct": [0, 2, 6, 9, 14, 15, 19, 20, 21, 24, 25, 27, 30], "direction_str": 6, "directionintern": [2, 9], "directli": [5, 6, 12], "directori": [14, 18, 22, 24], "dirt": 21, "discharg": 6, "disconnect": 23, "discov": [1, 18], "discoveri": [15, 17, 18, 19], "discret": 0, "disk": 22, "distanc": [6, 17], "distribut": [6, 7, 13, 15, 20], "divid": [6, 20], "dlc": 23, "do": 18, "doc": 23, "docker": [16, 22, 23], "docstr": 5, "document": [15, 16, 17, 18, 19], "doe": [14, 26, 28, 29], "doesn": [26, 28, 29], "domin": 21, "dominant_color": 21, "don": 26, "done": [19, 20, 21], "down": [6, 9, 24], "downgrad": 23, "drain": 6, "drill": [0, 6, 7, 13, 15, 19, 20, 21, 24, 27, 29, 30], "drill_east": 30, "drill_north": 30, "drill_south": 30, "drill_west": 30, "drop_posit": [0, 6, 15, 19, 21, 24, 27], "durat": [5, 14], "dure": [0, 6, 17, 23, 24, 29], "dynam": [15, 17], "dynamic_profit_multipli": 5, "e": [3, 12, 14, 16, 19, 20, 21, 24], "each": [14, 17, 22], "east": [6, 9, 30], "edg": [15, 17, 18, 21, 27], "effect": [20, 21], "effici": [13, 15, 17, 18, 19, 20, 21], "either": 6, "elaps": [1, 9], "elapsed_tim": 17, "electr": [2, 6, 7, 13], "electric_output_flow_limit": 6, "electrical_id": 6, "electricalproduc": [2, 6], "electricenergi": 7, "electricenergy2": 7, "electricengin": 7, "electricengineunit": 7, "electricfurnac": [2, 6, 7], "electricitygroup": [2, 6, 7], "electricitypol": [2, 6, 7], "electricminingdril": [2, 6, 7], "electron": 7, "electronic_circuit_throughput": 1, "electroniccircuit": 7, "elif": [15, 19, 20, 21], "els": [15, 17, 19, 20, 21, 26, 27, 28, 29, 30], "empti": [6, 7, 18, 29], "emptybarrel": 7, "emptycrudeoilbarrel": 7, "emptyheavyoilbarrel": 7, "emptylightoilbarrel": 7, "emptylubricantbarrel": 7, "emptypetroleumgasbarrel": 7, "emptysulfuricacidbarrel": 7, "emptywaterbarrel": 7, "enabl": [5, 6, 18, 19, 20, 24], "encapsul": [0, 24], "encod": [13, 21], "end": [3, 18], "end_posit": 6, "end_tim": [5, 16], "energi": [6, 7, 13, 24], "energy_sourc": 6, "energyshield": 7, "energyshield2": 7, "energysourc": [2, 6], "engin": 7, "engine_unit_throughput": 1, "engineunit": 7, "enhanc": [21, 24], "enhance_response_with_task_output": 12, "enough": 30, "ensur": [0, 1, 9, 13, 18, 21, 22, 23, 28, 30], "enter_loop": 10, "entiti": [0, 1, 2, 5, 7, 9, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26, 28, 29, 30], "entities_built": 20, "entity_class_nam": 7, "entity_loc": 21, "entity_util": 19, "entitycor": [2, 6, 13], "entitygroup": [2, 6], "entityinfo": [2, 6], "entitystatu": [0, 2, 6, 13, 15, 19, 20, 21, 24], "enum": [0, 4, 6, 7, 9, 30], "enumer": [4, 6, 7, 9], "enummeta": 7, "env": [0, 1, 2, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24], "environ": [0, 3, 5, 9, 12, 15, 16, 17, 19, 20, 21, 22, 23, 27], "episod": [15, 19, 20, 21, 24], "episode_count": 15, "equip": [7, 29], "error": [4, 9, 14, 15, 17, 18, 19, 20, 21, 23, 25, 26, 27, 28, 29, 30], "error_r": 19, "essenti": 14, "etc": [6, 14], "eval": [1, 2, 9, 14, 17, 19, 20, 21, 23, 24], "eval_dict": 10, "eval_with_error": [1, 9], "eval_with_timeout": 10, "evalu": [1, 9, 12, 15, 17, 19, 20, 21, 22, 23, 24, 25], "everi": 16, "exact": 6, "examin": 29, "exampl": [12, 14, 27], "except": [0, 10, 21, 24], "exchang": [6, 7], "execut": [1, 3, 5, 10, 14, 15, 17, 18, 24, 25], "execute_bodi": 10, "execute_nod": 10, "exhaust": 0, "exist": [15, 20, 23, 29, 30], "exit_loop": 10, "expect": [0, 30], "expens": 18, "experi": [15, 16, 17, 23], "explicitli": 6, "explor": [17, 19, 21, 24], "exploration_const": 5, "export": 16, "expr": [1, 9, 10], "express": [1, 7, 9, 10], "expressinsert": 7, "expresssplitt": 7, "expresstransportbelt": 7, "expressundergroundbelt": 7, "extend": 18, "extens": [15, 16], "extra": [6, 13], "extract": [6, 13, 14, 21, 26], "extract_item": [14, 28, 29], "extracted_count": 26, "f": [0, 15, 16, 18, 19, 20, 21, 26, 27, 28, 29, 30], "facil": 13, "factori": [1, 5, 12, 22, 24], "factorio": [0, 1, 3, 5, 9, 12, 13, 14, 16, 18, 19, 20, 22, 23, 24, 27], "factorioinst": [2, 9, 12, 25], "factorionamespac": [1, 2, 9, 10], "fail": [0, 1, 26, 28, 29, 30], "failur": [0, 1, 14, 18, 20, 21, 27], "fals": [1, 9, 10, 12, 13, 19, 20, 21], "fast": [1, 7, 9], "fastinsert": 7, "fastsplitt": 7, "fasttransportbelt": 7, "fastundergroundbelt": 7, "featur": [16, 23, 25], "feedback": [16, 21, 24], "field": 6, "file": [1, 9, 12, 14, 16, 17, 18, 22, 23, 24], "fill": 7, "fillcrudeoilbarrel": 7, "fillheavyoilbarrel": 7, "filllightoilbarrel": 7, "filllubricantbarrel": 7, "fillpetroleumgasbarrel": 7, "fillsulfuricacidbarrel": 7, "fillwaterbarrel": 7, "filter": [2, 5, 6, 7, 14, 18, 29], "filter_serializable_var": [2, 5], "filterinsert": [2, 6, 7], "final": 14, "find": [14, 19, 20, 21, 26, 27, 28, 29, 30], "find_entities_filt": 18, "firearm": 7, "firearmmagazin": 7, "firewal": 22, "first": [6, 22, 24], "first_namespac": [1, 9], "fix": 22, "flag": 30, "fle": [0, 1, 2, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24], "fle123": 16, "fle_databas": 16, "fle_db_typ": 16, "fle_us": 16, "flexibl": 15, "float": [1, 4, 5, 6, 9, 12, 13], "flow": [4, 5, 6, 10, 13], "flow_rat": 6, "fluid": [1, 6, 7, 13], "fluid_box": 6, "fluid_ingredient_shortag": 6, "fluid_system": 6, "fluidbox_id": 6, "fluidhandl": [2, 6], "fly": 7, "flyingrobotfram": 7, "focus": 17, "follow": [0, 13, 15, 17, 27], "forc": 23, "form": [6, 10], "format": [0, 5, 14, 21], "found": [18, 19, 21, 23, 29], "fp": 13, "fraction": [19, 20, 21], "frame": 7, "framework": [12, 15, 25], "frequenc": 20, "frequency_penalti": 5, "frequent": 16, "from": [1, 3, 5, 6, 7, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 26, 28, 29, 30], "from_attribut": 5, "from_dict": 5, "from_factorio_direct": 9, "from_inst": 5, "from_int": 6, "from_row": 5, "from_str": 6, "fuel": [6, 7, 19, 24], "full": [0, 16, 19, 26, 28, 29], "full_burnt_result_output": 6, "full_output": 6, "fully_charg": 6, "func": 5, "func_data": 5, "function": [0, 1, 3, 5, 6, 9, 10, 12, 13, 14, 18, 24], "furnac": [2, 6, 7, 14, 20, 28, 29], "furnace_result": 6, "furnace_sourc": 6, "g": [12, 14, 24], "ga": 7, "game": [0, 1, 5, 6, 7, 9, 12, 14, 15, 16, 18, 21, 22, 24, 25, 27, 29, 30], "game_info": [13, 15, 17, 19], "game_st": [0, 1, 9, 15, 19, 20, 21], "game_typ": [2, 15, 17, 18, 19, 20, 21], "gamecontrol": [2, 9], "gameinfo": 13, "gamest": [0, 2, 5], "gate": 7, "gather": 14, "gear": 7, "gener": [2, 6, 7, 13, 15, 16, 19, 21, 22, 23, 24], "generationparamet": [2, 5], "get": [0, 1, 3, 5, 6, 9, 10, 15, 16, 17, 18, 19, 20, 21, 23, 24, 26, 27, 28, 29, 30], "get_agent_card": 3, "get_agent_instruct": 12, "get_connection_amount": 14, "get_elapsed_tick": [1, 9], "get_ent": [0, 6, 13, 14, 15, 19, 20, 21, 24, 26, 28, 29], "get_environment_info": 1, "get_funct": 10, "get_messag": 10, "get_migration_statu": 16, "get_new_flow": 5, "get_performance_metr": 16, "get_posit": [0, 19, 21], "get_prototype_recip": 14, "get_research_progress": [14, 20], "get_resource_patch": 14, "get_reward": 17, "get_spe": [1, 9], "get_statist": 16, "get_step": 5, "get_system_prompt": [1, 9], "get_uct": 5, "get_warn": [1, 9], "global": [5, 14, 18], "goal": 13, "goal_descript": 12, "gold": 21, "gracefulli": [0, 15, 18], "gradual": 19, "grai": 21, "graphic": 23, "grenad": 7, "grid": 6, "ground": 7, "group": [6, 7, 14, 16], "guid": [22, 27], "guidanc": 21, "gun": 7, "gunturret": [2, 6, 7], "gym": [0, 17, 19, 20, 21, 25], "gym_env": [0, 1, 2, 15, 19, 20, 21], "gym_run_config": 24, "ha": [14, 22, 23, 26], "hand": 7, "handl": [6, 7, 9, 10, 14, 15, 17, 18, 19, 20, 21, 25, 26, 27, 28, 29, 30], "handle_break": 10, "handle_continu": 10, "harvest": [5, 14], "harvest_resourc": 14, "hasattr": [15, 19, 20, 21], "have": [1, 9, 10, 15, 23, 26, 28, 29], "health": [6, 13, 16], "heat": [6, 7], "heatexchang": [2, 6, 7], "heatpip": 7, "heavi": [7, 14], "heavyoil": 7, "heavyoilcrack": 7, "height": [6, 7, 13], "hello": [1, 13, 15, 16], "help": 23, "helper": 10, "here": [15, 17, 18], "hierarch": [17, 24], "high": [16, 17, 20, 21, 23], "hint": [18, 27], "histori": 16, "holdout_valu": 5, "holdout_wait_period": 12, "how": [0, 14, 19, 20, 21], "html": 23, "http": 18, "i": [0, 1, 3, 5, 6, 9, 12, 13, 15, 16, 17, 18, 19, 21, 22, 23, 24, 26, 28, 29, 30], "id": [1, 5, 6, 13, 16], "ideal": 16, "identif": 21, "identifi": [19, 21], "imag": [13, 21], "image_bound": 21, "image_cent": 21, "image_data": 21, "image_mod": 21, "image_process": 21, "image_processing_tim": 21, "image_s": 21, "img_arrai": 21, "immedi": 9, "implement": [1, 9, 14, 16, 18, 24, 25, 27, 29], "import": [1, 6, 12, 15, 16, 17, 18, 19, 20, 21, 23], "improv": [15, 19, 21], "includ": [0, 1, 5, 9, 12, 13, 14, 16, 18, 29], "index": [0, 14, 16, 25], "indexedposit": [2, 6], "indic": [12, 21], "individu": [13, 16], "info": [1, 13, 19, 20, 21], "inform": [0, 1, 5, 12, 14, 15, 16, 20, 21, 25, 27, 30], "infra": 23, "infrastructur": 20, "ingredi": [2, 5, 6, 14, 24], "inherit": [14, 15, 18], "init": 24, "initi": [5, 14, 15, 16, 19, 20, 21, 23], "initialis": [1, 6, 9], "inject": 3, "input": [1, 5, 6, 9, 14, 18, 21, 27], "input_connection_point": 6, "input_flow_limit": 6, "input_fluid": 6, "input_posit": 6, "insert": [2, 6, 7, 13, 14, 18, 28], "insert_item": [14, 26, 29], "inserted_count": 28, "inserter_throughput": 1, "inspect": [0, 27, 29], "inspect_inventori": [14, 15, 19, 20, 21, 26, 28], "inspectionresult": [2, 6], "instal": 25, "instanc": [0, 1, 2, 5, 6, 10, 12, 22], "insuffici": [29, 30], "int": [0, 4, 5, 6, 12, 13, 18, 26, 28], "integr": [1, 16], "intention": 24, "inter": [13, 20], "interact": [0, 1, 6, 9, 14, 15, 19, 21, 23, 25], "interfac": [1, 15, 16, 18], "intern": 24, "intflag": 6, "intuit": [15, 18], "invalid": [0, 1, 18, 24, 26, 27, 28, 29, 30], "inventori": [1, 2, 5, 6, 7, 9, 15, 16, 17, 19, 20, 21, 24, 25, 26, 28, 29, 30], "inventory_threshold": 15, "inventory_typ": 29, "invok": 14, "io": 21, "iron": [0, 7, 12, 13, 15, 17, 18, 19, 20, 24, 26, 28, 29, 30], "iron_gear_wheel_throughput": 1, "iron_or": [17, 19, 20, 21, 29], "iron_ore_throughput": [1, 13, 16, 19, 20, 21], "iron_pl": 17, "iron_plate_task": 12, "iron_plate_throughput": [1, 12, 17], "iron_plate_throughput_16": 12, "iron_po": [19, 20, 21, 30], "ironchest": [0, 7, 15, 19, 20, 21, 24, 27], "irongearwheel": 7, "ironor": [0, 7, 24, 27, 30], "ironpl": 7, "ironplatethroughputtask": 17, "ironstick": 7, "is_clos": 6, "is_complet": 17, "is_input": 6, "is_multiag": [1, 5, 9], "is_paus": 9, "is_sourc": 6, "is_terminu": 6, "is_valid": 5, "is_work": 0, "isinst": 15, "issu": [1, 16, 19, 20, 21, 22, 23], "item": [1, 5, 6, 13, 14, 15, 17, 19, 20, 21, 26, 27, 28, 29, 30], "item_data": 28, "item_ingredient_shortag": 6, "items_to_insert": 28, "its": 3, "ivborw0kggoaaaansuheugaa": 13, "jack": 6, "join": 15, "joint": 20, "json": [1, 5, 12, 17, 19, 20, 21, 24], "json_str": 5, "kei": [6, 12, 25], "keyword": 6, "kill": 6, "kwarg": [1, 3, 5, 6, 9], "kwd": 7, "lab": [1, 2, 6, 7, 13, 20, 22], "lab_input": 6, "lab_modul": 6, "lab_plai": 1, "label": 6, "laboratori": 6, "lamp": 7, "landfil": 7, "larg": [16, 17, 21, 23], "largest": [1, 22], "last": [1, 3, 9, 13, 24], "latenc": 20, "later": [0, 24], "latest": 16, "latest_vers": 16, "launch": [6, 14], "launch_count": 6, "launch_progress": 6, "launch_rocket": 14, "launching_rocket": 6, "layer": [2, 6], "learn": [0, 1, 5, 12, 15, 19, 20, 23, 24, 27], "leav": [1, 9], "left": [6, 9], "left_bottom": 6, "left_top": 6, "len": [19, 20, 21], "length": 0, "level": [5, 19], "leverag": [0, 27, 29], "librari": [0, 24], "licens": 23, "lift": 14, "light": 7, "lightoil": 7, "lightoilcrack": 7, "lightweight": 16, "like": [6, 14], "limit": [0, 15, 17, 18, 20, 22], "line": [0, 1, 9, 10, 19, 20, 21], "liquefact": 7, "liquifact": 7, "list": [1, 5, 6, 10, 13, 14, 15, 16, 18, 19, 20, 21, 29], "list_available_environ": 1, "list_backup": 16, "liter": 6, "live": 14, "llm": [5, 23, 25], "load": [1, 9, 10, 12, 15, 16, 18], "load_game_st": 16, "load_messag": 10, "load_step": 16, "load_trajectori": 16, "local": 18, "localhost": [1, 9, 16, 23], "locat": [14, 20, 30], "log": [10, 19], "log_level": 19, "logic": [14, 15, 17, 18, 24], "logist": [7, 20], "logistics2": 7, "logistics3": 7, "logistics_science_pack_throughput": 1, "logisticssciencepack": 7, "logit_bia": 5, "long": 7, "longer": 29, "longhandedinsert": 7, "look": [1, 9, 19, 21], "loop": 24, "loop_nod": 10, "loopcontext": [2, 10], "low": [7, 20], "low_density_structure_throughput": 1, "low_input_fluid": 6, "low_pow": 6, "low_temperatur": 6, "lowdensitystructur": 7, "lua": [14, 18], "lubric": 7, "m": 23, "machin": [6, 7, 13, 14, 20], "made": [6, 18], "magazin": 7, "magazine_s": 6, "mai": 24, "main": 1, "maintain": [0, 10, 21, 24, 25], "mainten": 25, "make": [0, 1, 5, 13, 15, 19, 20, 21, 22, 23, 30], "manag": [5, 15, 16, 19, 20, 21, 24, 25], "manual": [16, 23], "map": [6, 10, 13, 17, 19, 21, 22], "map_imag": [13, 21], "markdown": 14, "materi": [1, 7, 29], "max_connect": 16, "max_ent": 17, "max_length": 0, "max_mining_setup": [15, 19], "max_pow": 17, "max_static_unit_profit_cap": 5, "max_step": [15, 19, 20, 21], "max_token": 5, "maxim": 12, "maximum": 14, "mb": 21, "mcp": 23, "md": [14, 18], "meaning": 18, "meant": 6, "measur": 17, "medium": [7, 16, 20, 21], "mediumelectricpol": 7, "member": 10, "memori": [15, 20, 21, 22, 24], "memory_usag": 21, "messag": [0, 2, 5, 10, 13, 18, 20, 26, 28, 29, 30], "message_delivery_r": 20, "message_processing_tim": 20, "message_timeout": 20, "meta": [4, 5], "metadata": [4, 5, 12, 16], "method": [3, 6, 13, 14, 18, 21, 29], "metric": [5, 12, 13, 15, 16, 18, 25], "might": 21, "migrat": 25, "militari": [1, 7], "military_science_pack_throughput": 1, "militarysci": 7, "militarysciencepack": 7, "mine": [0, 6, 7, 13, 15, 19, 20, 21, 24, 27, 29, 30], "minim": [16, 19], "mining_dril": [20, 21], "mining_item": 29, "mining_op": 0, "mining_radiu": 15, "mining_setup": [15, 19, 20], "miningdril": [0, 2, 6, 13, 15, 19, 20, 21, 24, 27, 30], "miningoper": 0, "minut": 19, "miss": [1, 21], "missing_required_fluid": 6, "missing_science_pack": 6, "mistak": 24, "mk2": 7, "mkdir": 18, "mock": 17, "mod": 22, "mode": [14, 18, 19, 21, 27], "model": [3, 6, 13, 21, 25], "model_config": [4, 5, 6, 13], "model_post_init": 6, "modif": 3, "modul": [1, 25], "modular": [7, 15], "modulararmor": 7, "moment": 24, "monitor": [0, 14, 15, 19, 20, 21, 22, 25, 26, 27, 28, 29, 30], "monitoring_interv": 19, "more": [19, 21, 22, 26, 28], "most": [1, 3, 14, 27], "mount": 22, "move": [6, 13, 14], "move_to": 14, "movement": 0, "multi": [14, 15, 16, 17, 25], "multi_agent_perform": 20, "multiagent_config": 20, "multiagent_coordin": 20, "multiagentcoordin": 20, "multifluidhandl": [2, 6], "multipl": [6, 14, 16, 17, 20, 22, 23, 28], "must": [18, 30], "my": 18, "my_custom_ag": 15, "my_custom_task": 17, "my_tool": [14, 18], "myagent": 16, "mycustomag": 15, "mycustomtask": 17, "mytool": 18, "n": [1, 5, 9, 15], "name": [0, 3, 5, 6, 7, 10, 13, 15, 16, 17, 18, 19, 20, 21, 24, 26, 28, 29], "namespac": [0, 2, 3, 5, 9, 24, 25], "namespace_class": [1, 9], "namespace_str": 10, "narrow": [14, 18], "natur": 6, "navig": 23, "ndarrai": 21, "nearest": [0, 14, 15, 19, 20, 21, 24, 27, 30], "nearest_build": [14, 30], "necessari": 22, "need": [6, 10, 14, 15, 16, 18, 19, 20, 22, 23], "neg": 18, "neighbour": [6, 24], "nest": 10, "network": [1, 6, 16, 22, 29], "new": [3, 5, 6, 13, 14, 15, 17, 18], "next": [0, 3, 14, 25, 27], "next_clockwis": 9, "next_counterclockwis": 9, "night": 7, "nightvis": 7, "no_ammo": 6, "no_fuel": [6, 19], "no_ingredi": 6, "no_input_fluid": 6, "no_minable_resourc": 6, "no_pow": [6, 15, 19], "no_recip": 6, "no_research_in_progress": 6, "node": 10, "non": 6, "none": [0, 1, 3, 5, 6, 7, 9, 10, 12, 15, 17, 18, 19, 20, 21, 24], "normal": [6, 10, 19, 23, 24], "north": [0, 6, 9, 15, 19, 20, 21, 24, 27, 30], "not_connect": 6, "not_connected_to_rail": 6, "not_plugged_in_electric_network": 6, "np": 21, "nuclear": [6, 7], "nuclearfuelreprocess": 7, "nuclearpow": 7, "nuclearreactor": 7, "num_ag": [0, 1, 5, 9], "number": [0, 1, 9, 10, 12, 18, 20, 26, 28], "numpi": 21, "ob": [1, 19, 20, 21], "object": [0, 1, 3, 5, 7, 9, 10, 12, 13, 14, 17, 21, 22, 24, 30], "object_detect": 21, "object_detection_threshold": 21, "object_interaction_predict": 21, "observ": [1, 15, 16, 19, 20, 21, 24, 25], "obstacl": 14, "offici": 23, "offshor": [6, 7], "offshorepump": [2, 6, 7], "oil": [1, 6, 7], "oilprocess": 7, "oilrefineri": [2, 6, 7], "old": 16, "onc": 23, "onli": [1, 5, 6, 9, 23], "open": [1, 21, 22, 23, 25], "open_plai": 1, "openai": [1, 23], "openai_api_kei": 23, "oper": [0, 5, 6, 13, 14, 15, 16, 18, 19, 20, 21, 24, 27, 29], "operation_nam": 5, "opportun": 20, "opposit": 9, "optim": [12, 15, 17, 18, 19, 20, 21, 25], "optimization_en": 19, "optimization_request": 20, "option": [0, 1, 4, 5, 6, 12, 13, 14, 18, 25, 26, 28, 29, 30], "orchestr": 22, "ore": [7, 13, 15, 18, 19, 20, 24, 26, 28, 29, 30], "ores": 14, "organ": 24, "orient": [6, 14, 30], "origin": [6, 10], "other": [1, 6, 14, 15, 16, 18, 20, 23, 28, 29, 30], "out": [1, 9], "output": [0, 5, 6, 13, 16, 18, 21, 24, 25], "output_connection_point": 6, "output_flow_limit": 6, "output_fluid": 6, "output_posit": 6, "over": [15, 19, 29], "overal": 20, "overall_system_perform": 20, "overhead": 20, "overrid": 3, "overview": [14, 18, 25], "p": [16, 22], "pack": [1, 7], "packag": 23, "page": 25, "pair": 18, "panel": [6, 7], "parallel": 21, "param": [1, 3, 9], "param1": [15, 18], "param2": 18, "param3": 18, "paramet": [0, 6, 12, 14, 15, 16, 17, 18, 21, 22, 27], "parent_id": 5, "parent_nod": 10, "parent_visit": 5, "pars": [5, 6, 17, 18], "parse_agent_messag": 5, "parse_arg": 6, "parse_raw": 5, "part": 7, "partial": [26, 28], "pass": [6, 17, 20], "patch": [0, 19, 21, 24], "path": 16, "pathfind": 14, "pattern": [14, 21, 24, 25], "paus": [1, 9, 14], "pause_at_spe": 9, "payload": 6, "peac": [1, 9], "per": [1, 17, 19, 21], "percentag": 14, "perform": [12, 13, 14, 15, 17, 18, 24, 25, 27], "permiss": [22, 23, 29], "persist": [0, 1, 15, 22], "petroleum": 7, "petroleum_gas_throughput": 1, "petroleumga": 7, "phase": 19, "pickl": 5, "pickup_ent": [14, 30], "pickup_posit": 6, "pierc": 7, "piercing_round_throughput": 1, "piercingroundsmagazin": 7, "pil": 21, "pip": 23, "pipe": [2, 6, 7, 13, 14], "pipegroup": [2, 6, 7], "pixel": 21, "place": [0, 6, 14, 19, 20, 21, 24, 27, 28, 29, 30], "place_ent": [0, 13, 14, 15, 19, 20, 21, 24, 27, 29], "place_entity_next_to": [0, 14, 15, 19, 20, 21, 24, 27, 30], "place_mining_setup": 0, "placeabl": 14, "placement": [0, 14, 17, 19, 30], "plai": [1, 22], "plan": [14, 18, 19, 20, 21], "plant": [6, 7, 14], "plastic": [6, 7], "plastic_bar_throughput": 1, "plasticbar": 7, "plate": [7, 12, 13, 17, 29], "player": [6, 13, 14, 26, 27, 28, 29], "player_posit": 6, "png": [13, 21], "point": 16, "pole": [6, 7], "polici": [3, 15], "pool": 16, "poor": 21, "popular": 24, "populate_by_nam": 6, "port": [22, 23], "posit": [0, 2, 6, 14, 15, 18, 19, 20, 21, 24, 25, 27, 30], "possibl": [1, 18, 22], "post": 5, "postgr": 16, "postgres_db": 16, "postgres_password": 16, "postgres_us": 16, "postgresql": [23, 25], "power": [6, 7, 14, 15, 17, 19], "power_usag": 19, "powerarmor": 7, "powerarmor2": 7, "powerpol": 13, "practic": [14, 25], "pre": 14, "pre_holdout_wait_period": 12, "predict": 21, "preexist": 10, "preparing_rocket_for_launch": 6, "prerequisit": [5, 13, 14, 25], "presence_penalti": 5, "preserv": [1, 9], "prevent": 0, "previou": [1, 9], "previous": 24, "price_list": 5, "print": [0, 1, 14, 15, 16, 18, 19, 20, 21, 24, 26, 27, 28, 29, 30], "prioriti": 20, "priority_bas": 20, "privat": 6, "proactiv": 24, "probabl": 6, "problem": 20, "procedur": 22, "process": [6, 7, 15, 20, 25], "processing_perform": 21, "processing_unit_throughput": 1, "processingunit": 7, "produc": [6, 17, 19], "product": [2, 5, 6, 7, 12, 13, 14, 16, 20], "production_science_pack_throughput": 1, "productionflow": [2, 4, 5], "productionsciencepack": 7, "productivitymodul": 7, "productivitymodule2": 7, "productivitymodule3": 7, "profit": 5, "profitconfig": [2, 5], "program": [2, 5, 14, 23, 24], "program_id": 4, "progress": [5, 13, 14, 19], "prompt": [1, 9], "prompt_token_usag": 5, "proper": [5, 27, 29], "properli": [15, 22, 23], "properti": [1, 5, 6, 7, 9, 13, 23], "protocol": [15, 20, 23], "prototyp": [0, 2, 6, 7, 13, 15, 19, 20, 21, 24, 27, 30], "prototype_nam": 7, "prototypemetaclass": [2, 7], "provid": [0, 1, 12, 13, 15, 16, 18, 22, 23, 24, 29], "provis": 12, "psql": 23, "pump": [2, 6, 7], "pumpjack": [2, 6, 7], "purchas": 23, "py": [1, 14, 17, 18, 23], "pydant": [4, 5, 6, 13], "pydantic_cor": 6, "pytest": [15, 17, 18], "python": [0, 1, 10, 12, 14, 15, 17, 18, 23, 24], "python3": 23, "qualiti": 21, "quantiti": [6, 13, 14], "queri": [13, 16, 24], "queue": 14, "quick": [16, 23], "quickstart": 25, "quota": 12, "radar": 7, "radiu": [6, 14, 18], "rag": 3, "rail": [2, 6, 7], "railwai": [6, 7], "railwaytransport": 7, "rais": [1, 6, 9, 24], "rang": 21, "rate": [12, 17, 19, 20], "raw": 1, "raw_reward": 5, "raw_text": 13, "rcon_client": 9, "reactiv": 24, "reactor": [2, 6, 7], "read": 24, "readabl": 0, "reason": [4, 21], "recent": 3, "recip": [2, 6, 7, 13, 14], "recipenam": [2, 7], "recognit": 21, "recommend": [14, 16, 23], "reconstruct": 5, "record": 19, "recoveri": [19, 20, 21, 25], "recovery_tim": 19, "recurs": 14, "reduc": [20, 21], "refer": [0, 2, 14, 20], "reference_posit": [0, 15, 19, 20, 21, 24, 27], "refineri": [6, 7], "regardless": [1, 9], "region": 21, "regist": [1, 15, 17, 18], "register_ag": 15, "register_all_environ": 1, "registr": 25, "registri": [15, 17, 25], "regular": 16, "reinforc": 1, "rel": [14, 30], "relationship": 21, "relev": 24, "reliabl": 19, "reload_tim": 6, "remain": 14, "remov": [14, 16, 26, 27, 28, 29, 30], "render": [6, 23], "render_message_tool": 9, "repl": 24, "replac": [15, 20], "replai": 15, "report": [0, 20], "repres": [5, 6, 14, 24], "represent": [5, 24], "reprocess": 7, "request": [0, 20], "requir": [1, 6, 13, 14, 16, 17, 18, 20, 22, 24, 26, 28, 30], "research": [5, 6, 7, 17, 20, 22, 25], "research_plan": 20, "research_prior": 20, "research_progress": 5, "research_queu": [5, 20], "research_specialist": 20, "research_start": 20, "research_unit_count": 5, "research_unit_energi": 5, "researchspe": 7, "researchspecialist": 20, "researchst": [2, 5], "reset": [0, 1, 9, 10, 15, 17, 19, 20, 21], "reset_paus": [1, 9], "reset_posit": [1, 9], "reset_spe": [1, 9], "reset_to_default": 9, "reshap": 21, "resnet50": 21, "resolut": [15, 20, 21], "resolv": 20, "resourc": [0, 2, 6, 7, 13, 17, 19, 20, 21, 22, 24, 25, 29, 30], "resource_collect": 20, "resource_identif": 21, "resource_patch": 21, "resource_po": [15, 20], "resource_request": 20, "resource_scann": 18, "resource_specialist": 20, "resource_typ": [0, 18, 20], "resource_util": 19, "resource_wast": 19, "resourcecollectorag": 15, "resourcenam": [2, 7], "resourcepatch": [2, 6, 7], "resourcescann": 18, "resourcespecialist": 20, "respect": 14, "respons": [2, 3, 4, 5, 12, 16, 20], "restart": 22, "restor": [1, 5, 9, 16], "restore_backup": 16, "result": [0, 1, 5, 9, 10, 14, 18, 20, 26, 27, 28, 29, 30], "retri": 29, "retriev": [1, 13, 14, 24], "return": [0, 1, 3, 5, 6, 9, 10, 12, 14, 15, 17, 18, 19, 20, 21, 24, 27], "reus": [1, 16, 24], "reusabl": [1, 15], "reward": [1, 12, 16, 17, 19, 20, 21], "rgb": 21, "rich": [1, 13], "right": [6, 9, 23], "right_bottom": 6, "right_top": 6, "robot": 7, "robust": [0, 17, 20, 21], "rock": [6, 14], "rocket": [2, 6, 7, 14], "rocket_inventori": 6, "rocket_part": 6, "rocket_progress": 6, "rocketcontrol": 7, "rocketcontrolunit": 7, "rocketfuel": 7, "rocketpart": 7, "rocketsilo": [2, 6, 7], "rocketsilotechnologi": 7, "role": [5, 20], "rotat": [14, 23], "rotate_ent": [14, 30], "round": 7, "round_robin": 20, "row": 5, "rtd": [], "rtype": [1, 9], "rule": [14, 17], "run": [0, 1, 14, 16, 22, 23, 24, 25], "runtim": [0, 24], "runtime_error": 4, "safe": 23, "satellit": 7, "save": [16, 22, 24], "save_game_st": 16, "save_step": 16, "save_trajectori": 16, "scalabl": [20, 22], "scale": [16, 17, 23, 24], "scan": [15, 17, 18], "scanner": 25, "scenario": [15, 16, 17, 18, 19, 25, 27], "schedul": 16, "schema": [1, 9, 25], "scienc": [1, 7], "score": [4, 12, 13], "screenshot": 21, "script": 23, "sdk": 23, "search": [14, 25], "second": [1, 5, 6, 9, 14, 17, 20, 21, 24], "section": [2, 6, 27], "secur": [16, 18], "see": [14, 22, 24, 27], "segment": 21, "select": 23, "self": [0, 6, 14, 15, 17, 18, 19, 20, 21, 24], "send": 20, "send_messag": 20, "sens": 30, "sent": [6, 14], "sequenc": [10, 14], "serial": [5, 10, 14, 15], "serializ": 5, "serializablefunct": [2, 5, 10], "serialize_model": 6, "serialized_funct": 13, "server": [14, 16, 18, 22, 23, 29], "set": [1, 6, 9, 15, 16, 19, 21, 22, 23, 30], "set_convers": 3, "set_entity_recip": 14, "set_research": [14, 20], "set_spe": [1, 9], "set_speed_and_unpaus": [1, 9], "set_system_messag": 5, "setup": [0, 6, 12, 16, 19, 20, 21, 25], "setup_api_kei": 23, "setup_inst": 12, "sever": [1, 9, 16, 22], "shape": 21, "share": [15, 20], "shared_st": 20, "shared_state_s": 20, "shield": 7, "shortli": 23, "should": [3, 4, 5, 6, 13, 14], "show": 14, "show_number_of_steps_left_in_prompt": 12, "side": [14, 18, 25], "signatur": [0, 1, 5, 9, 13, 14], "silo": [6, 7, 14], "simpl": [15, 18, 19, 21, 27], "simplifi": 21, "simul": 24, "sinc": [1, 6, 9], "singl": [3, 5, 10, 16], "site": 23, "size": [6, 13, 14, 16, 17, 20, 21], "sk": 23, "skills_db_host": 16, "skills_db_nam": 16, "skills_db_password": 16, "skills_db_port": 16, "skills_db_us": 16, "sleep": [0, 14, 24], "slot": 7, "slow": [20, 21], "small": [7, 16], "smallelectricpol": 7, "smalllamp": 7, "smelt": 6, "snapshot": 16, "solar": [6, 7], "solarenergi": 7, "solarpanel": [2, 6, 7], "solid": [6, 7], "solidfuel": 7, "solidfuelfromheavyoil": 7, "solidfuelfromlightoil": 7, "solidfuelfrompetroleumga": 7, "solut": [26, 28, 29, 30], "someth": 18, "sophist": 21, "sourc": [0, 1, 3, 4, 5, 6, 7, 9, 10, 12, 13, 16, 23, 25], "south": [0, 6, 9, 15, 19, 20, 21, 24, 27, 30], "space": [1, 7, 14, 22, 23, 25], "spacesci": 7, "spacesciencepack": 7, "spatial": [17, 21], "spatial_analysis_depth": 21, "spatial_featur": 21, "spatial_reason": 21, "spatial_understand": 21, "special": [10, 14, 15, 25], "specialist": 20, "specif": [1, 6, 12, 14, 15, 16, 17, 18, 20, 21, 23, 27, 29], "specifi": 30, "speed": [1, 7, 9, 13, 14], "sphinx": 23, "split": 20, "splitter": [2, 6, 7], "sql": 16, "sqlite": 25, "sqlite_db_fil": 16, "stack": [0, 7], "stackfilterinsert": 7, "stackinsert": 7, "stackinsertercapacity1": 7, "stackinsertercapacity2": 7, "stale": 14, "standard": [0, 1, 12, 24], "start": [1, 9, 17, 19, 20, 21, 23, 24], "start_posit": 6, "start_tim": [5, 16, 17], "starting_inventori": 12, "startswith": 20, "startup": 16, "stat": [16, 22], "state": [0, 1, 3, 5, 9, 12, 14, 15, 16, 17, 18, 19, 20, 24, 25], "state_id": 16, "statement": 0, "static": [1, 5, 6, 9, 12], "static_item": 5, "staticent": [2, 6], "statist": [12, 13, 16, 18], "statu": [0, 6, 12, 13, 14, 15, 16, 19, 20, 21, 22, 24], "status_int": 6, "status_str": 6, "status_upd": 20, "stderr": [13, 24], "stdout": [13, 14, 24], "steam": [6, 7, 23], "steam_output_point": 6, "steamengin": 7, "steel": 7, "steel_plate_throughput": 1, "steelchest": 7, "steelfurnac": 7, "steelplat": 7, "steelprocess": 7, "step": [1, 3, 4, 12, 14, 16, 19, 20, 21, 23, 25], "step_count": [19, 20, 21], "step_numb": 16, "step_statist": 12, "stick": 7, "stone": [7, 19, 21, 29], "stone_wall_throughput": 1, "stonebrick": 7, "stonefurnac": 7, "stonewal": 7, "stop": 22, "stop_sequ": 5, "storag": [0, 1, 6, 7, 13, 19, 21, 24, 26, 28, 29], "storagetank": [2, 6, 7], "store": [0, 1, 5, 6, 13, 16, 21, 24], "str": [0, 1, 3, 4, 5, 6, 9, 12, 13, 15, 18, 19, 20, 21, 26, 28, 29, 30], "strategi": [3, 15, 20], "stream": 24, "string": [5, 10, 14, 18], "strong": 21, "structur": [1, 7, 14, 22, 25, 27], "sub": 17, "succe": 21, "succeed": [18, 26, 28, 29, 30], "success": [4, 12, 15, 16, 17, 18, 20, 24, 26, 27, 28, 29, 30], "success_threshold": [15, 19, 20, 21], "sudo": [22, 23], "sufuric_acid_throughput": 1, "suggest": 0, "suit": 14, "sulfur": [6, 7], "sulfur_throughput": 1, "sulfuricacid": 7, "sulfurprocess": 7, "sum": [19, 20, 21, 29], "summaris": 3, "sunlight": 6, "super": [15, 17, 19, 20, 21], "suppli": [6, 19], "support": [0, 10, 12, 14, 16, 22, 23, 26, 28, 29, 30], "sure": [22, 23], "surfac": 18, "symbol": 24, "syntax": 0, "synthes": 14, "synthesi": [0, 1, 15, 24], "system": [1, 5, 9, 12, 15, 16, 18, 19, 22, 23, 24, 25], "system_prompt": 3, "t": [26, 28, 29], "t1": 16, "tabl": [14, 16, 18], "take": [0, 1, 6], "tank": [6, 7], "target": [13, 15, 17], "target_ag": 20, "target_resourc": [15, 19, 20], "task": [1, 2, 4, 15, 16, 19, 20, 22, 25, 27], "task_assign": 20, "task_complet": 20, "task_completion_r": 20, "task_definit": [1, 17], "task_distribut": 20, "task_info": 13, "task_kei": [1, 12], "task_path": 12, "task_queu": 20, "task_respons": 12, "task_verif": 13, "taskabc": [2, 12], "taskfactori": [2, 12], "taskrespons": [2, 4, 12], "taskverif": 13, "tcp_port": [1, 9], "techniqu": 21, "technologi": [2, 5, 7, 13, 14, 17, 20, 22], "technologyst": [2, 5], "temperatur": 5, "termin": [1, 19, 20, 21], "terrain": 30, "test": [14, 16, 19, 20, 25, 27], "test_agent_act": 15, "test_agent_cr": 15, "test_agent_reset": 15, "test_task_complet": 17, "test_task_cr": 17, "test_task_evalu": 17, "test_tool_cr": 18, "test_tool_error_handl": 18, "test_tool_execut": 18, "test_tool_with_posit": 18, "text": 0, "than": 26, "thei": 24, "them": [14, 26, 27], "theme": [], "thi": [0, 1, 2, 3, 5, 6, 9, 12, 14, 19, 20, 21, 22, 23, 24, 27], "third": 6, "thoroughli": [19, 20, 27], "threshold": 21, "through": [0, 1, 15, 22, 24], "throughout": [5, 24], "throughput": [1, 12, 13, 17, 19], "throughput_ent": 12, "throughput_task": 1, "throughputtask": [2, 12], "thu": 6, "tick": [1, 4, 5, 9, 13, 17], "tier": 6, "tile": [6, 14, 18], "tile_dimens": [6, 13, 24], "tile_height": [6, 24], "tile_width": [6, 24], "tiledimens": [2, 6, 13, 24], "time": [5, 13, 14, 15, 16, 17, 19, 20, 21, 22, 24, 29], "time_elaps": 6, "time_limit": 17, "timeout": [1, 4, 9, 10], "timestamp": [5, 16], "timing_metr": 5, "timingmetr": [2, 5], "to_bounding_box": 6, "to_dict": [0, 5], "to_factorio_direct": 9, "to_inst": 5, "to_raw": 5, "togeth": [16, 20, 27], "token_usag": 5, "toler": 6, "tolist": 21, "tool": [0, 1, 24], "tool_nam": 27, "top": [6, 21], "total": [5, 14, 16, 19, 21, 29], "total_dur": 5, "total_item": [19, 21, 29], "total_materi": 29, "total_reward": [15, 16], "toward": [6, 13], "trace": 0, "track": [5, 6, 13, 14, 15, 16, 19, 21, 26, 27, 28, 29], "train": 6, "trajectori": [3, 16, 24], "trajectory_001": 16, "trajectory_id": 16, "trajectory_length": 12, "transfer": [13, 14, 26, 28], "transport": [6, 7, 13], "transportbelt": [2, 6, 7, 13], "treat": 14, "tree": [6, 13, 14], "troubleshoot": 25, "true": [1, 3, 5, 6, 9, 10, 12, 16, 18, 19, 20, 21], "truncat": [1, 19, 20, 21], "try": [0, 10, 21], "tune": 21, "tupl": [6, 21], "turn": 3, "turret": 7, "turret_ammo": 6, "two": 5, "type": [0, 1, 3, 5, 6, 9, 10, 12, 14, 18, 19, 20, 21, 24, 25, 26, 27, 28, 29, 30], "typehint": [], "unbound": [1, 12, 22], "unboundedthroughputtask": [2, 12], "uncheck": 23, "underground": [6, 7], "undergroundbelt": [2, 6, 7], "undergroundpip": 7, "understand": [14, 21], "understood": 21, "unifi": 16, "union": 6, "uniqu": 21, "unique_color": 21, "unit": [1, 7], "unlock": 13, "unlock_all_research": 12, "unpaus": [1, 9], "unpickl": 5, "unwrap": 10, "unwrap_after_deseri": [2, 10], "up": [1, 6, 9, 13, 15, 19, 21, 22, 23, 24], "updat": [3, 14, 15, 18, 20, 26, 28], "update_st": 3, "upper": [15, 20], "uptim": 19, "uranium": 7, "uranium235": 7, "uranium238": 7, "uraniumfuelcel": 7, "uraniumor": 7, "uraniumprocess": 7, "us": [0, 1, 3, 5, 6, 7, 9, 12, 14, 15, 16, 18, 21, 22, 23, 24, 26, 27, 28, 29, 30], "usag": [0, 12, 14, 15, 18, 19, 20, 21, 22, 25, 26, 28, 29, 30], "use_populated_inventori": 12, "user": [16, 22, 23], "util": [5, 7, 19, 21, 24, 29], "utility_science_pack_throughput": 1, "utilitysciencepack": 7, "uv": 23, "v": 0, "valid": [5, 6, 13, 14, 16, 18, 19, 23, 25, 27, 30], "validate_by_alia": 6, "validate_by_nam": 6, "validationerror": 6, "valu": [0, 4, 5, 6, 7, 9, 10, 12, 18, 19, 20, 21, 27, 29, 30], "value1": [15, 18], "valueerror": 0, "variabl": [0, 1, 3, 10, 16, 22, 24], "variou": [5, 12, 14, 15, 17, 27, 29, 30], "vars_dict": 5, "verif": 25, "verifi": [0, 12, 16, 18, 19, 22, 23, 24, 26, 28, 29], "version": [5, 16, 18, 23], "version_descript": 5, "vision": [7, 21], "vision_en": 21, "visit": 5, "visual": [15, 25], "visual_accuraci": 21, "visual_ag": 21, "visual_agent_config": 21, "visual_analysi": 21, "visual_memori": 21, "visual_memory_s": 21, "visual_planning_effect": 21, "visual_reason": 21, "visualag": 21, "volum": [22, 23], "vote": 20, "wa": 29, "wait": 14, "waiting_for_source_item": 6, "waiting_for_space_in_destin": 6, "waiting_to_launch_rocket": 6, "wall": [6, 7], "wallgroup": [2, 6], "warn": [1, 6, 13], "wast": 19, "water": [6, 7, 14], "we": [1, 9, 15], "websit": 23, "west": [6, 9, 30], "what": [6, 14], "wheel": 7, "when": [1, 3, 6, 9, 16, 18, 24], "where": [6, 26, 28, 30], "whether": [13, 18, 26, 28, 29, 30], "which": [1, 5, 14, 24], "while": [10, 14, 19, 20, 21], "whose": 29, "width": [6, 7, 13], "within": 16, "without": [1, 9, 22, 23], "wood": 7, "wooden": 7, "woodenchest": 7, "work": [0, 6, 14, 15, 19, 20, 21, 24], "workflow": 14, "working_ent": [19, 20, 21], "world": [13, 14, 24, 30], "wrap": 10, "wrap_for_seri": [2, 10], "wrapper": 5, "write": 18, "written": 24, "x": [6, 13, 18, 19, 21, 23, 24, 30], "y": [6, 13, 18, 19, 21, 24, 30], "you": [14, 17, 18, 22, 23, 24], "your": [14, 15, 17, 18, 22, 23], "zero": 18}, "titles": ["Action Space", "Environment API", "API Modules", "fle.agents.agent_abc module", "fle.agents.models module", "fle.commons.models module", "fle.env.entities module", "fle.env.game_types module", "fle.env.gym_env module", "fle.env.instance module", "fle.env.namespace module", "fle.eval.algorithms module", "fle.eval.tasks module", "Observation Space", "Tools API", "Implementing Custom Agents", "Database Configuration", "Creating Custom Tasks", "Creating Custom Tools", "Basic Agent Example", "Multi-Agent Example", "Visual Agent Example", "Cluster Setup", "Installation", "Quickstart", "Welcome to Factorio Learning Environment\u2019s documentation!", "extract_item", "Tools Documentation", "insert_item", "inspect_inventory", "place_entity"], "titleterms": {"": 25, "action": 0, "advanc": [15, 17, 18, 22], "agent": [0, 2, 3, 4, 15, 19, 20, 21], "agent_abc": 3, "algorithm": 11, "analysi": 21, "api": [1, 2, 14, 23, 25], "architectur": [14, 15, 18, 20], "avail": 1, "backup": 16, "base": 15, "basic": 19, "behavior": 19, "best": [0, 15, 16, 17, 18, 19, 20, 21, 26, 27, 28, 29, 30], "build": 23, "categori": [14, 27], "class": 15, "client": [16, 23], "cluster": 22, "code": 0, "collector": 15, "common": [2, 5], "compon": 0, "concept": [1, 24], "configur": [15, 16, 17, 19, 20, 21, 22, 23], "connect": [14, 27], "control": [14, 27], "core": [1, 2, 14, 27], "craft": [14, 27], "creat": [14, 17, 18], "custom": [14, 15, 17, 18, 25], "databas": 16, "debug": [14, 27], "definit": [0, 17], "develop": [18, 27], "direct": 13, "document": [14, 23, 25, 27], "entiti": [6, 13, 14, 27], "env": [6, 7, 8, 9, 10], "environ": [1, 2, 24, 25], "error": [0, 1], "eval": [11, 12], "evalu": 2, "exampl": [0, 1, 13, 15, 16, 17, 18, 19, 20, 21, 24, 25, 26, 28, 29, 30], "execut": 0, "extract_item": 26, "factorio": 25, "factorioinst": 1, "failur": [26, 28, 29, 30], "featur": [15, 17, 18, 21], "fle": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "game": 13, "game_typ": 7, "get": 25, "gym": 1, "gym_env": 8, "handl": [0, 1], "implement": [15, 17, 19, 20, 21], "indic": 25, "inform": 13, "insert_item": 28, "inspect_inventori": 29, "instal": 23, "instanc": 9, "interact": 24, "inventori": [13, 14, 27], "kei": [1, 15, 16, 23, 24], "learn": 25, "maintain": 23, "mainten": 16, "manag": [1, 13, 14, 22, 27], "method": [1, 15, 16], "metric": [19, 20, 21], "migrat": 16, "mode": [26, 28, 29, 30], "model": [2, 4, 5], "modul": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "monitor": 16, "movement": [14, 27], "multi": [0, 20], "namespac": [1, 10], "next": 24, "observ": 13, "optim": 16, "option": 23, "output": [14, 19, 27], "overview": [19, 20, 21, 24, 26, 28, 29, 30], "paramet": [26, 28, 29, 30], "pattern": 27, "perform": [16, 19, 20, 21], "place_ent": 30, "posit": 13, "postgresql": 16, "practic": [0, 15, 16, 17, 18, 19, 20, 21, 26, 27, 28, 29, 30], "prerequisit": 23, "process": [18, 21], "queri": [14, 27], "quickstart": 24, "recoveri": 16, "refer": 25, "registr": [15, 17, 18], "registri": 1, "relat": [26, 28, 29, 30], "research": [13, 14, 27], "resourc": [14, 15, 18, 27], "return": [26, 28, 29, 30], "run": [19, 20, 21], "scanner": 18, "scenario": 22, "schema": 16, "setup": [22, 23], "side": 23, "space": [0, 13], "special": 20, "sqlite": 16, "start": [22, 25], "state": 13, "step": 24, "structur": [0, 13, 17, 18], "system": [13, 20], "tabl": 25, "task": [12, 13, 17], "test": [15, 17, 18], "tool": [14, 18, 25, 26, 27, 28, 29, 30], "troubleshoot": [16, 19, 20, 21, 22, 23], "type": [13, 15, 16, 17], "usag": [1, 16, 27], "valid": 0, "verif": 13, "visual": 21, "welcom": 25}})
\ No newline at end of file
diff --git a/docs/sphinx/build/html/tools/extract_item.html b/docs/sphinx/build/html/tools/extract_item.html
new file mode 100644
index 000000000..2aca8a078
--- /dev/null
+++ b/docs/sphinx/build/html/tools/extract_item.html
@@ -0,0 +1,230 @@
+
+
+
+
+
+
+
+
+
extract_item — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/tools/index.html b/docs/sphinx/build/html/tools/index.html
new file mode 100644
index 000000000..f73c0e136
--- /dev/null
+++ b/docs/sphinx/build/html/tools/index.html
@@ -0,0 +1,324 @@
+
+
+
+
+
+
+
+
+
Tools Documentation — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/tools/insert_item.html b/docs/sphinx/build/html/tools/insert_item.html
new file mode 100644
index 000000000..c26cb4e58
--- /dev/null
+++ b/docs/sphinx/build/html/tools/insert_item.html
@@ -0,0 +1,233 @@
+
+
+
+
+
+
+
+
+
insert_item — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+insert_item
+Places items from player inventory into entities.
+
+Overview
+The insert_item tool allows agents to transfer items from their inventory into entity inventories such as chests, furnaces, and other storage containers.
+
+
+Parameters
+
+entity (Entity)The entity to insert items into.
+
+item (str)The name of the item to insert.
+
+count (int, optional)The number of items to insert. Defaults to 1.
+
+
+
+
+Returns
+Dictionary containing:
+
+success (bool): Whether the insertion succeeded
+inserted_count (int): Number of items actually inserted
+entity (Entity): The updated entity
+error (str): Error message (if failed)
+
+
+
+Examples
+
+Basic Usage # Insert iron ore into a chest
+result = insert_item (
+ entity = chest ,
+ item = 'iron-ore' ,
+ count = 10
+)
+
+if result . get ( 'success' ):
+ print ( f "Inserted { result . get ( 'inserted_count' ) } iron ore" )
+else :
+ print ( f "Error: { result . get ( 'error' ) } " )
+
+
+
+Insert Multiple Items # Insert different items into a furnace
+items_to_insert = [
+ { 'item' : 'iron-ore' , 'count' : 50 },
+ { 'item' : 'coal' , 'count' : 10 }
+]
+
+for item_data in items_to_insert :
+ result = insert_item (
+ entity = furnace ,
+ item = item_data [ 'item' ],
+ count = item_data [ 'count' ]
+ )
+
+ if result . get ( 'success' ):
+ print ( f "Inserted { result . get ( 'inserted_count' ) } { item_data [ 'item' ] } " )
+
+
+
+
+
+
+Best Practices
+
+Check Entity Type : Ensure the entity supports item insertion
+Verify Item Compatibility : Check that the item can be inserted into the entity
+Handle Partial Insertions : Account for cases where not all items can be inserted
+Monitor Inventory : Track inventory changes after insertion
+
+
+
+Failure Modes
+
+Invalid Entity
+Error : “Entity does not support item insertion”
+Cause : Entity type doesn’t support inventory
+Solution : Check entity type before insertion
+
+
+Item Not Available
+Error : “Item not available in player inventory”
+Cause : Player doesn’t have the required item
+Solution : Check player inventory before insertion
+
+
+Entity Full
+Error : “Entity inventory is full”
+Cause : Entity cannot accept more items
+Solution : Check entity capacity or use different entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/tools/inspect_inventory.html b/docs/sphinx/build/html/tools/inspect_inventory.html
new file mode 100644
index 000000000..1c1beaa48
--- /dev/null
+++ b/docs/sphinx/build/html/tools/inspect_inventory.html
@@ -0,0 +1,285 @@
+
+
+
+
+
+
+
+
+
inspect_inventory — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+ inspect_inventory
+
+
+
+
+
+
+
+
+
+inspect_inventory
+Checks contents of player or entity inventories.
+
+Overview
+The inspect_inventory tool allows agents to examine the contents of inventories. It supports various inventory types including player inventories, chests, furnaces, and other entities with storage capabilities.
+
+
+Parameters
+
+entity (Entity, optional)The entity whose inventory to inspect. If not provided, inspects the player’s inventory.
+
+inventory_type (str, optional)The type of inventory to inspect. Options: ‘player’, ‘entity’, ‘all’.
+
+
+
+
+Returns
+Dictionary containing:
+
+success (bool): Whether the inspection succeeded
+inventory (Inventory): The inventory contents
+entity (Entity): The entity whose inventory was inspected (if applicable)
+error (str): Error message (if failed)
+
+
+
+Examples
+
+Basic Usage # Inspect player inventory
+result = inspect_inventory ()
+
+if result . get ( 'success' ):
+ inventory = result . get ( 'inventory' )
+ print ( f "Player inventory: { inventory } " )
+
+ # Check specific items
+ iron_ore = inventory . get ( 'iron-ore' , 0 )
+ coal = inventory . get ( 'coal' , 0 )
+ print ( f "Iron ore: { iron_ore } , Coal: { coal } " )
+else :
+ print ( f "Error: { result . get ( 'error' ) } " )
+
+
+
+Entity Inventory # Inspect entity inventory
+entities = get_entities ()
+for entity in entities :
+ if entity . name == 'iron-chest' :
+ result = inspect_inventory ( entity = entity )
+
+ if result . get ( 'success' ):
+ inventory = result . get ( 'inventory' )
+ print ( f "Chest inventory: { inventory } " )
+
+ # Check if chest is full
+ total_items = sum ( inventory . values ())
+ if total_items > 0 :
+ print ( f "Chest contains { total_items } items" )
+ break
+
+
+
+Inventory Analysis # Analyze inventory contents
+result = inspect_inventory ()
+
+if result . get ( 'success' ):
+ inventory = result . get ( 'inventory' )
+
+ # Count total items
+ total_items = sum ( inventory . values ())
+ print ( f "Total items: { total_items } " )
+
+ # List all items
+ for item , count in inventory . items ():
+ if count > 0 :
+ print ( f " { item } : { count } " )
+
+ # Check for specific resources
+ resources = [ 'iron-ore' , 'copper-ore' , 'coal' , 'stone' ]
+ for resource in resources :
+ count = inventory . get ( resource , 0 )
+ if count > 0 :
+ print ( f "Have { count } { resource } " )
+
+
+
+Inventory Filtering # Check for specific items
+result = inspect_inventory ()
+
+if result . get ( 'success' ):
+ inventory = result . get ( 'inventory' )
+
+ # Check for mining equipment
+ mining_items = [ 'mining-drill' , 'burner-mining-drill' ]
+ for item in mining_items :
+ count = inventory . get ( item , 0 )
+ if count > 0 :
+ print ( f "Have { count } { item } " )
+
+ # Check for building materials
+ building_materials = [ 'iron-plate' , 'copper-plate' , 'stone' ]
+ total_materials = sum ( inventory . get ( item , 0 ) for item in building_materials )
+ print ( f "Total building materials: { total_materials } " )
+
+
+
+
+
+
+Best Practices
+
+Check Success : Always verify the inspection succeeded
+Handle Empty Inventories : Account for empty inventories
+Use Inventory Methods : Leverage inventory utility methods
+Monitor Changes : Track inventory changes over time
+Error Handling : Implement proper error handling
+
+
+
+Failure Modes
+
+Invalid Entity
+Error : “Entity does not have an inventory”
+Cause : Entity type doesn’t support inventory
+Solution : Check entity type before inspection
+
+
+Entity Not Found
+Error : “Entity not found or no longer exists”
+Cause : Entity was removed or doesn’t exist
+Solution : Verify entity exists before inspection
+
+
+Permission Denied
+Error : “Permission denied to inspect inventory”
+Cause : Insufficient permissions
+Solution : Check agent permissions
+
+
+Network Error
+Error : “Network error during inventory inspection”
+Cause : Communication failure with game server
+Solution : Retry the operation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/build/html/tools/place_entity.html b/docs/sphinx/build/html/tools/place_entity.html
new file mode 100644
index 000000000..6546eefb7
--- /dev/null
+++ b/docs/sphinx/build/html/tools/place_entity.html
@@ -0,0 +1,266 @@
+
+
+
+
+
+
+
+
+
place_entity — Factorio Learning Environment 0.3.0 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Factorio Learning Environment
+
+
+
+
+
+
+
+
+
+place_entity
+Places entities in the world at specified positions.
+
+Overview
+The place_entity tool allows agents to place various entities in the game world. It handles placement validation, direction setting, and returns information about the placed entity.
+
+
+Parameters
+
+entity (Prototype)The type of entity to place. Must be a valid Prototype enum value.
+
+position (Position)The position where to place the entity. Must be a valid Position object.
+
+direction (Direction, optional)The direction to orient the entity. Defaults to Direction.NORTH.
+
+
+
+
+Returns
+Dictionary containing:
+
+success (bool): Whether the placement succeeded
+entity (Entity): The placed entity object (if successful)
+error (str): Error message (if failed)
+
+
+
+Examples
+
+Basic Usage # Place a mining drill
+result = place_entity (
+ entity = Prototype . MiningDrill ,
+ position = Position ( 10 , 20 ),
+ direction = Direction . NORTH
+)
+
+if result . get ( 'success' ):
+ drill = result . get ( 'entity' )
+ print ( f "Placed mining drill at { drill . position } " )
+else :
+ print ( f "Error: { result . get ( 'error' ) } " )
+
+
+
+With Resource Location # Find iron ore and place mining drill
+iron_pos = nearest ( Resource . IronOre )
+if iron_pos :
+ result = place_entity (
+ entity = Prototype . MiningDrill ,
+ position = iron_pos ,
+ direction = Direction . NORTH
+ )
+
+ if result . get ( 'success' ):
+ drill = result . get ( 'entity' )
+ print ( f "Placed mining drill on iron ore at { drill . position } " )
+
+
+
+Direction Examples # Place entities in different directions
+drill_north = place_entity (
+ entity = Prototype . MiningDrill ,
+ position = Position ( 0 , 0 ),
+ direction = Direction . NORTH
+)
+
+drill_south = place_entity (
+ entity = Prototype . MiningDrill ,
+ position = Position ( 10 , 0 ),
+ direction = Direction . SOUTH
+)
+
+drill_east = place_entity (
+ entity = Prototype . MiningDrill ,
+ position = Position ( 20 , 0 ),
+ direction = Direction . EAST
+)
+
+drill_west = place_entity (
+ entity = Prototype . MiningDrill ,
+ position = Position ( 30 , 0 ),
+ direction = Direction . WEST
+)
+
+
+
+
+
+
+Best Practices
+
+Check Position Validity : Ensure the position is valid for the entity type
+Handle Errors : Always check the success flag and handle errors
+Use Appropriate Directions : Choose directions that make sense for the entity
+Validate Resources : Ensure required resources are available
+Monitor Placement : Check that entities are placed correctly
+
+
+
+Failure Modes
+
+Invalid Entity Type
+Error : “Invalid entity type ‘invalid’. Expected Prototype enum value.”
+Cause : Using an invalid entity type
+Solution : Use valid Prototype enum values
+
+
+Invalid Position
+Error : “Position (x, y) is not valid for entity type”
+Cause : Position conflicts with existing entities or terrain
+Solution : Choose a different position or clear the area
+
+
+Insufficient Resources
+Error : “Insufficient resources to place entity”
+Cause : Not enough items in inventory
+Solution : Ensure required items are available
+
+
+Invalid Direction
+Error : “Invalid direction for entity type”
+Cause : Direction not supported by entity type
+Solution : Use supported directions for the entity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/source/advanced/database.rst b/docs/sphinx/source/advanced/database.rst
new file mode 100644
index 000000000..600da6aa3
--- /dev/null
+++ b/docs/sphinx/source/advanced/database.rst
@@ -0,0 +1,407 @@
+Database Configuration
+======================
+
+FLE supports database checkpointing for long-running trajectories. The database stores agent outputs, environment feedback, game states, and histories of trajectories.
+
+Overview
+--------
+
+The database system enables:
+
+- **Checkpointing**: Save game state at every agent step
+- **Resume Capability**: Continue trajectories from any checkpoint
+- **Trajectory History**: Track complete agent interaction history
+- **Analytics**: Analyze agent behavior across runs
+
+Supported Databases
+-------------------
+
+FLE supports two database backends out of the box:
+
+1. **SQLite** (Default): File-based, zero-configuration
+2. **PostgreSQL**: Client-server, better for concurrent access
+
+SQLite Configuration
+--------------------
+
+SQLite is the default database and requires minimal configuration.
+
+Setup
+~~~~~
+
+1. Set the database type in ``.env``:
+
+ .. code-block:: bash
+
+ FLE_DB_TYPE="sqlite"
+
+2. Configure the database file location:
+
+ .. code-block:: bash
+
+ SQLITE_DB_FILE=".fle/data.db"
+
+The SQLite file will be created automatically in the specified location if it doesn't exist.
+
+Benefits
+~~~~~~~~
+
+- **Zero Setup**: No server required
+- **Portable**: Single file contains all data
+- **Simple**: Easy to backup and share
+
+Limitations
+~~~~~~~~~~~
+
+- Not suitable for concurrent writes
+- Limited scalability for very large datasets
+- Single-threaded access
+
+PostgreSQL Configuration
+------------------------
+
+PostgreSQL provides better performance for large-scale experiments and concurrent access.
+
+Setup with Docker
+~~~~~~~~~~~~~~~~~
+
+The easiest way to set up PostgreSQL is using Docker:
+
+.. code-block:: bash
+
+ docker run --name fle-postgres \
+ -e POSTGRES_PASSWORD=fle123 \
+ -e POSTGRES_USER=fle_user \
+ -e POSTGRES_DB=fle_database \
+ -p 5432:5432 \
+ -d postgres:15
+
+Environment Variables
+~~~~~~~~~~~~~~~~~~~~~
+
+Configure PostgreSQL in your ``.env`` file:
+
+.. code-block:: bash
+
+ # Database Configuration - Set to postgres to use PostgreSQL
+ FLE_DB_TYPE="postgres"
+
+ # PostgreSQL Configuration
+ SKILLS_DB_HOST=localhost
+ SKILLS_DB_PORT=5432
+ SKILLS_DB_NAME=fle_database
+ SKILLS_DB_USER=fle_user
+ SKILLS_DB_PASSWORD=fle123
+
+Manual PostgreSQL Setup
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+If you prefer to install PostgreSQL manually:
+
+1. Install PostgreSQL 15+
+2. Create a database:
+
+ .. code-block:: sql
+
+ CREATE DATABASE fle_database;
+ CREATE USER fle_user WITH PASSWORD 'fle123';
+ GRANT ALL PRIVILEGES ON DATABASE fle_database TO fle_user;
+
+3. Update ``.env`` with your connection details
+
+Benefits
+~~~~~~~~
+
+- **Concurrent Access**: Multiple processes can write simultaneously
+- **Scalability**: Handles large datasets efficiently
+- **Advanced Features**: Better query optimization, indexes, etc.
+
+Limitations
+~~~~~~~~~~~
+
+- Requires server setup and management
+- More complex configuration
+- Network dependency
+
+Database Schema
+---------------
+
+The FLE database stores:
+
+Trajectories
+~~~~~~~~~~~~
+
+- ``id``: Unique trajectory identifier
+- ``task_id``: Associated task
+- ``start_time``: When trajectory began
+- ``end_time``: When trajectory completed
+- ``status``: Current status (running, completed, failed)
+
+Steps
+~~~~~
+
+- ``id``: Unique step identifier
+- ``trajectory_id``: Parent trajectory
+- ``step_number``: Sequential step number
+- ``agent_code``: Code executed by agent
+- ``environment_feedback``: Response from environment
+- ``game_state``: Serialized game state
+- ``timestamp``: When step occurred
+
+Game States
+~~~~~~~~~~~
+
+- ``id``: Unique state identifier
+- ``trajectory_id``: Associated trajectory
+- ``step_id``: Associated step
+- ``state_data``: Serialized game state
+- ``timestamp``: When state was captured
+
+Using the Database
+------------------
+
+Accessing the Database
+~~~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ from fle.commons.db_client import get_db_client
+
+ # Get database client (auto-detects type from .env)
+ db = get_db_client()
+
+ # Query trajectories
+ trajectories = db.get_all_trajectories()
+
+ # Get specific trajectory
+ trajectory = db.get_trajectory(trajectory_id)
+
+ # Get steps for a trajectory
+ steps = db.get_trajectory_steps(trajectory_id)
+
+Saving Checkpoints
+~~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ # Save a checkpoint
+ db.save_checkpoint(
+ trajectory_id=trajectory_id,
+ step_number=step_num,
+ agent_code=code,
+ environment_feedback=feedback,
+ game_state=state
+ )
+
+Resuming from Checkpoint
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ # Load checkpoint
+ checkpoint = db.get_checkpoint(trajectory_id, step_number)
+
+ # Resume environment from checkpoint
+ env.load_state(checkpoint['game_state'])
+
+ # Continue execution
+ obs, reward, done, truncated, info = env.step(next_action)
+
+Database Client API
+-------------------
+
+Core Methods
+~~~~~~~~~~~~
+
+.. code-block:: python
+
+ # Create new trajectory
+ trajectory_id = db.create_trajectory(task_id, metadata)
+
+ # Save step
+ db.save_step(trajectory_id, step_data)
+
+ # Get trajectory
+ trajectory = db.get_trajectory(trajectory_id)
+
+ # Get all trajectories for a task
+ trajectories = db.get_task_trajectories(task_id)
+
+ # Delete trajectory
+ db.delete_trajectory(trajectory_id)
+
+Query Methods
+~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ # Get latest checkpoint
+ checkpoint = db.get_latest_checkpoint(trajectory_id)
+
+ # Get checkpoint at specific step
+ checkpoint = db.get_checkpoint(trajectory_id, step_number)
+
+ # Count steps in trajectory
+ count = db.count_steps(trajectory_id)
+
+ # Check if trajectory exists
+ exists = db.trajectory_exists(trajectory_id)
+
+Migration
+---------
+
+Switching Databases
+~~~~~~~~~~~~~~~~~~~
+
+To migrate from SQLite to PostgreSQL:
+
+1. Export data from SQLite:
+
+ .. code-block:: python
+
+ from fle.commons.db_client import SQLiteClient
+
+ sqlite_db = SQLiteClient(db_file='.fle/data.db')
+ trajectories = sqlite_db.export_all()
+
+2. Import into PostgreSQL:
+
+ .. code-block:: python
+
+ from fle.commons.db_client import PostgreSQLClient
+
+ pg_db = PostgreSQLClient(
+ host='localhost',
+ port=5432,
+ database='fle_database',
+ user='fle_user',
+ password='fle123'
+ )
+ pg_db.import_all(trajectories)
+
+3. Update ``.env`` to use PostgreSQL
+
+Backup and Restore
+------------------
+
+SQLite Backup
+~~~~~~~~~~~~~
+
+.. code-block:: bash
+
+ # Simple file copy
+ cp .fle/data.db .fle/data.db.backup
+
+ # Or use SQLite command
+ sqlite3 .fle/data.db ".backup '.fle/data.db.backup'"
+
+PostgreSQL Backup
+~~~~~~~~~~~~~~~~~
+
+.. code-block:: bash
+
+ # Dump database
+ pg_dump -h localhost -U fle_user fle_database > backup.sql
+
+ # Restore database
+ psql -h localhost -U fle_user fle_database < backup.sql
+
+Performance Optimization
+------------------------
+
+SQLite Optimization
+~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ # Use WAL mode for better concurrency
+ db.execute("PRAGMA journal_mode=WAL")
+
+ # Increase cache size
+ db.execute("PRAGMA cache_size=-64000") # 64MB
+
+PostgreSQL Optimization
+~~~~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: sql
+
+ -- Create indexes for common queries
+ CREATE INDEX idx_trajectory_task ON trajectories(task_id);
+ CREATE INDEX idx_step_trajectory ON steps(trajectory_id);
+ CREATE INDEX idx_step_timestamp ON steps(timestamp);
+
+ -- Analyze tables
+ ANALYZE trajectories;
+ ANALYZE steps;
+
+Troubleshooting
+---------------
+
+Connection Errors
+~~~~~~~~~~~~~~~~~
+
+**SQLite**:
+
+- Verify file path exists and is writable
+- Check file permissions
+- Ensure parent directory exists
+
+**PostgreSQL**:
+
+- Verify server is running: ``docker ps`` or ``systemctl status postgresql``
+- Check connection details in ``.env``
+- Test connection: ``psql -h localhost -U fle_user fle_database``
+
+Performance Issues
+~~~~~~~~~~~~~~~~~~
+
+**SQLite**:
+
+- Enable WAL mode
+- Increase cache size
+- Consider switching to PostgreSQL for large datasets
+
+**PostgreSQL**:
+
+- Add indexes on frequently queried columns
+- Tune PostgreSQL configuration (``postgresql.conf``)
+- Monitor query performance with ``EXPLAIN ANALYZE``
+
+Disk Space
+~~~~~~~~~~
+
+**SQLite**:
+
+.. code-block:: bash
+
+ # Check database size
+ du -h .fle/data.db
+
+ # Vacuum to reclaim space
+ sqlite3 .fle/data.db "VACUUM;"
+
+**PostgreSQL**:
+
+.. code-block:: sql
+
+ -- Check database size
+ SELECT pg_size_pretty(pg_database_size('fle_database'));
+
+ -- Vacuum to reclaim space
+ VACUUM ANALYZE;
+
+Best Practices
+--------------
+
+1. **Regular Backups**: Back up your database regularly, especially before major experiments
+2. **Use PostgreSQL for Large Runs**: For experiments with >1000 steps, use PostgreSQL
+3. **Clean Up Old Data**: Periodically remove old trajectories you no longer need
+4. **Monitor Disk Space**: Keep an eye on database size, especially with SQLite
+5. **Use Transactions**: Batch multiple operations in transactions for better performance
+
+Next Steps
+----------
+
+- Review :doc:`../getting_started/quickstart` for basic usage
+- See :doc:`../environment/overview` for environment context
+- Check :doc:`../getting_started/troubleshooting` for common issues
diff --git a/docs/sphinx/source/advanced/mcp.rst b/docs/sphinx/source/advanced/mcp.rst
new file mode 100644
index 000000000..2f2fc935f
--- /dev/null
+++ b/docs/sphinx/source/advanced/mcp.rst
@@ -0,0 +1,276 @@
+Model Context Protocol (MCP)
+============================
+
+FLE supports the `Model Context Protocol
`_ (MCP) to enable LLM reasoning models to invoke tools directly.
+
+Overview
+--------
+
+The Model Context Protocol is a standardized interface that allows AI models to interact with external tools and services. FLE's MCP integration enables:
+
+- Direct tool invocation from LLM reasoning models
+- Standardized request/response formats
+- Seamless integration with MCP-compatible clients
+
+What is MCP?
+------------
+
+MCP provides a universal interface for:
+
+1. **Tool Discovery**: Models can discover available tools and their capabilities
+2. **Tool Invocation**: Models can call tools with structured parameters
+3. **Result Handling**: Models receive typed responses from tool calls
+
+Benefits
+--------
+
+Using MCP with FLE provides:
+
+- **Standardization**: Works with any MCP-compatible client
+- **Type Safety**: Structured tool definitions with parameter types
+- **Extensibility**: Easy to add new tools to the MCP interface
+- **Interoperability**: Compatible with the broader MCP ecosystem
+
+Installation
+------------
+
+To use MCP features, install FLE with MCP support:
+
+.. code-block:: bash
+
+ pip install factorio-learning-environment[mcp]
+
+ # Or with uv
+ uv add factorio-learning-environment[mcp]
+
+Configuration
+-------------
+
+MCP configuration is located in ``fle/env/protocols/_mcp/``. The MCP server automatically exposes all agent-accessible tools.
+
+Using MCP
+---------
+
+Starting the MCP Server
+~~~~~~~~~~~~~~~~~~~~~~~
+
+The MCP server can be started alongside the FLE environment:
+
+.. code-block:: python
+
+ from fle.env.protocols.mcp import MCPServer
+
+ # Initialize MCP server
+ server = MCPServer()
+ server.start()
+
+Tool Discovery
+~~~~~~~~~~~~~~
+
+MCP clients can discover available tools:
+
+.. code-block:: python
+
+ # List all available tools
+ tools = server.list_tools()
+
+ for tool in tools:
+ print(f"Tool: {tool.name}")
+ print(f"Description: {tool.description}")
+ print(f"Parameters: {tool.parameters}")
+
+Invoking Tools
+~~~~~~~~~~~~~~
+
+Tools can be invoked through the MCP interface:
+
+.. code-block:: python
+
+ # Invoke a tool
+ result = server.invoke_tool(
+ tool_name="place_entity",
+ parameters={
+ "entity": "burner-mining-drill",
+ "position": {"x": 10, "y": 20},
+ "direction": "north"
+ }
+ )
+
+ print(f"Result: {result}")
+
+Integration with LLM Clients
+-----------------------------
+
+MCP-Compatible Clients
+~~~~~~~~~~~~~~~~~~~~~~
+
+FLE's MCP implementation works with:
+
+- Claude Desktop
+- Other MCP-compatible AI assistants
+- Custom MCP clients
+
+Example Integration
+~~~~~~~~~~~~~~~~~~~
+
+Here's how to integrate FLE with an MCP-compatible client:
+
+.. code-block:: json
+
+ {
+ "mcpServers": {
+ "factorio": {
+ "command": "python",
+ "args": ["-m", "fle.env.protocols.mcp.server"],
+ "env": {
+ "FLE_CLUSTER_HOST": "localhost",
+ "FLE_CLUSTER_PORT": "34197"
+ }
+ }
+ }
+ }
+
+Tool Definitions
+----------------
+
+MCP tools are automatically generated from FLE's tool definitions. Each tool includes:
+
+- **Name**: The tool identifier
+- **Description**: What the tool does (from ``agent.md``)
+- **Parameters**: Typed parameter schema
+- **Return Type**: Expected response format
+
+Example Tool Definition
+~~~~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: json
+
+ {
+ "name": "place_entity",
+ "description": "Places an entity in the world at a specified position",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "entity": {
+ "type": "string",
+ "description": "The entity prototype to place"
+ },
+ "position": {
+ "type": "object",
+ "properties": {
+ "x": {"type": "number"},
+ "y": {"type": "number"}
+ }
+ },
+ "direction": {
+ "type": "string",
+ "enum": ["north", "south", "east", "west"]
+ }
+ },
+ "required": ["entity", "position"]
+ }
+ }
+
+Advanced Usage
+--------------
+
+Custom MCP Tools
+~~~~~~~~~~~~~~~~
+
+You can create custom MCP-specific tools by following the :doc:`../tools/custom_tools` guide. Tools created this way are automatically exposed via MCP.
+
+Error Handling
+~~~~~~~~~~~~~~
+
+MCP calls return structured errors:
+
+.. code-block:: json
+
+ {
+ "error": {
+ "code": "InvalidParameters",
+ "message": "Entity 'invalid-entity' not found",
+ "details": {
+ "entity": "invalid-entity",
+ "available_entities": ["burner-mining-drill", "iron-chest", ...]
+ }
+ }
+ }
+
+State Management
+~~~~~~~~~~~~~~~~
+
+MCP maintains state between tool calls:
+
+- Variables persist in the namespace
+- Entities remain referenced across calls
+- Game state is preserved
+
+Architecture
+------------
+
+.. code-block:: text
+
+ ┌─────────────────────┐
+ │ MCP Client │
+ │ (Claude, etc.) │
+ └──────────┬──────────┘
+ │
+ │ MCP Protocol
+ │
+ ┌──────────▼──────────┐
+ │ MCP Server │
+ │ (FLE Protocol) │
+ └──────────┬──────────┘
+ │
+ │ Tool Calls
+ │
+ ┌──────────▼──────────┐
+ │ FLE Environment │
+ │ (Game Instance) │
+ └─────────────────────┘
+
+Documentation
+-------------
+
+For detailed MCP documentation, see:
+
+- `Official MCP Documentation `_
+- ``fle/env/protocols/_mcp/README.md`` in the repository
+
+Troubleshooting
+---------------
+
+Connection Issues
+~~~~~~~~~~~~~~~~~
+
+If MCP clients can't connect:
+
+1. Verify the MCP server is running
+2. Check port configuration
+3. Ensure Factorio cluster is started
+
+Tool Not Found
+~~~~~~~~~~~~~~
+
+If a tool is not available via MCP:
+
+1. Verify the tool exists in ``fle/env/tools/agent/``
+2. Check that the tool has all required files (``client.py``, ``server.lua``, ``agent.md``)
+3. Restart the MCP server
+
+Invalid Parameters
+~~~~~~~~~~~~~~~~~~
+
+If tool calls fail with parameter errors:
+
+1. Check the tool's parameter schema
+2. Verify parameter types match the schema
+3. Ensure required parameters are provided
+
+Next Steps
+----------
+
+- Review :doc:`../tools/overview` to understand available tools
+- See :doc:`../tools/custom_tools` to create MCP-compatible tools
+- Check the official MCP documentation for client integration
diff --git a/docs/sphinx/source/advanced/sprites.rst b/docs/sphinx/source/advanced/sprites.rst
new file mode 100644
index 000000000..2d26bffda
--- /dev/null
+++ b/docs/sphinx/source/advanced/sprites.rst
@@ -0,0 +1,351 @@
+Sprites
+=======
+
+FLE includes sprite management functionality for downloading spritemaps, extracting individual entity sprites, icons, and other visual assets from HuggingFace for use in visual reasoning tasks.
+
+Overview
+--------
+
+The sprite system provides:
+
+- **Sprite Downloads**: Automatic downloading of Factorio sprite assets
+- **Extraction**: Processing spritemaps into individual entity sprites
+- **Icons**: Entity and item icons for visual identification
+- **Visual Reasoning**: Support for vision-enabled agents
+
+Why Use Sprites?
+----------------
+
+Sprites enable visual reasoning capabilities for agents:
+
+1. **Visual Observations**: Agents can see the game state as images
+2. **Entity Recognition**: Identify entities by their visual appearance
+3. **Spatial Reasoning**: Understand layouts and positioning visually
+4. **Multimodal Learning**: Combine text and visual information
+
+Installation
+------------
+
+Sprites are automatically downloaded when needed, but you can pre-download them:
+
+.. code-block:: bash
+
+ # Download and generate sprites
+ fle sprites
+
+ # Force re-download even if sprites exist
+ fle sprites --force
+
+ # Use custom directories and worker count
+ fle sprites --spritemap-dir .fle/spritemaps --sprite-dir .fle/sprites --workers 5
+
+Default Locations
+-----------------
+
+By default, sprites are stored in:
+
+- **Spritemaps**: ``.fle/spritemaps/`` - Raw spritemap files from HuggingFace
+- **Sprites**: ``.fle/sprites/`` - Extracted individual entity/item sprites
+
+You can customize these locations using command-line arguments.
+
+CLI Usage
+---------
+
+Basic Command
+~~~~~~~~~~~~~
+
+.. code-block:: bash
+
+ # Download and extract sprites
+ fle sprites
+
+Options
+~~~~~~~
+
+.. code-block:: bash
+
+ # Force re-download
+ fle sprites --force
+
+ # Custom directories
+ fle sprites --spritemap-dir /path/to/spritemaps --sprite-dir /path/to/sprites
+
+ # Parallel processing (default: 4 workers)
+ fle sprites --workers 8
+
+Programmatic Usage
+------------------
+
+Loading Sprites
+~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ from fle.env.sprites import SpriteManager
+
+ # Initialize sprite manager
+ sprite_manager = SpriteManager()
+
+ # Get sprite for an entity
+ sprite = sprite_manager.get_sprite('burner-mining-drill')
+
+ # Get icon for an item
+ icon = sprite_manager.get_icon('iron-plate')
+
+ # Get all available sprites
+ available = sprite_manager.list_sprites()
+
+Using Sprites with Agents
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ from fle.agents import VisualAgent
+ import gym
+
+ # Create environment with visual observations
+ env = gym.make("iron_ore_throughput")
+
+ # Create visual agent
+ agent = VisualAgent(
+ sprite_manager=SpriteManager(),
+ model="gpt-4-vision"
+ )
+
+ # Agent can now use visual information
+ obs = env.reset()
+ action = agent.get_action(obs, include_visual=True)
+
+Visual Observations
+-------------------
+
+Visual observations include:
+
+- **Map Image**: Base64 encoded PNG of the game map
+- **Entity Sprites**: Individual entity appearances
+- **Overlays**: Visual indicators for status, connections, etc.
+
+Example observation with visuals:
+
+.. code-block:: python
+
+ {
+ 'raw_text': '...',
+ 'entities': [...],
+ 'map_image': 'data:image/png;base64,...',
+ 'sprites': {
+ 'burner-mining-drill': 'data:image/png;base64,...',
+ 'iron-chest': 'data:image/png;base64,...'
+ }
+ }
+
+Sprite Categories
+-----------------
+
+Entity Sprites
+~~~~~~~~~~~~~~
+
+Visual representations of game entities:
+
+- Mining drills
+- Furnaces
+- Assembling machines
+- Inserters
+- Transport belts
+- Pipes
+- Power poles
+
+Item Icons
+~~~~~~~~~~
+
+Icons for items and resources:
+
+- Raw materials (ore, wood, stone)
+- Plates (iron, copper, steel)
+- Intermediate products
+- Science packs
+- Modules
+
+Performance Considerations
+--------------------------
+
+Sprite Loading
+~~~~~~~~~~~~~~
+
+- Sprites are loaded on-demand by default
+- Pre-loading all sprites increases memory usage but improves performance
+- Use worker processes for faster initial extraction
+
+Caching
+~~~~~~~
+
+- Extracted sprites are cached on disk
+- Subsequent loads are much faster
+- Clear cache with ``fle sprites --force``
+
+Resolution
+~~~~~~~~~~
+
+Sprites are provided at their native resolution. You can resize them as needed:
+
+.. code-block:: python
+
+ from PIL import Image
+ import base64
+ from io import BytesIO
+
+ # Decode base64 sprite
+ sprite_data = base64.b64decode(sprite_base64)
+ image = Image.open(BytesIO(sprite_data))
+
+ # Resize
+ resized = image.resize((32, 32))
+
+Advanced Usage
+--------------
+
+Custom Sprite Sources
+~~~~~~~~~~~~~~~~~~~~~
+
+You can provide custom sprite sources:
+
+.. code-block:: python
+
+ sprite_manager = SpriteManager(
+ spritemap_dir='/custom/path/spritemaps',
+ sprite_dir='/custom/path/sprites'
+ )
+
+Batch Processing
+~~~~~~~~~~~~~~~~
+
+Process multiple sprites efficiently:
+
+.. code-block:: python
+
+ # Get multiple sprites at once
+ sprites = sprite_manager.get_sprites([
+ 'burner-mining-drill',
+ 'iron-chest',
+ 'stone-furnace'
+ ])
+
+Export Sprites
+~~~~~~~~~~~~~~
+
+Export sprites to individual files:
+
+.. code-block:: bash
+
+ # Export all sprites to directory
+ fle sprites --export-dir ./exported_sprites
+
+Integration with Vision Models
+-------------------------------
+
+GPT-4 Vision
+~~~~~~~~~~~~
+
+.. code-block:: python
+
+ import openai
+ import base64
+
+ # Get map image
+ map_image = obs['map_image']
+
+ # Send to GPT-4 Vision
+ response = openai.ChatCompletion.create(
+ model="gpt-4-vision-preview",
+ messages=[
+ {
+ "role": "user",
+ "content": [
+ {"type": "text", "text": "Analyze this Factorio base layout:"},
+ {"type": "image_url", "image_url": {"url": map_image}}
+ ]
+ }
+ ]
+ )
+
+Claude Vision
+~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ import anthropic
+
+ client = anthropic.Anthropic()
+
+ # Get map image (remove data URL prefix)
+ map_image_data = obs['map_image'].split(',')[1]
+
+ message = client.messages.create(
+ model="claude-3-opus-20240229",
+ messages=[
+ {
+ "role": "user",
+ "content": [
+ {
+ "type": "image",
+ "source": {
+ "type": "base64",
+ "media_type": "image/png",
+ "data": map_image_data
+ }
+ },
+ {
+ "type": "text",
+ "text": "What entities do you see in this layout?"
+ }
+ ]
+ }
+ ]
+ )
+
+Troubleshooting
+---------------
+
+Download Fails
+~~~~~~~~~~~~~~
+
+If sprite download fails:
+
+1. Check your internet connection
+2. Verify access to HuggingFace
+3. Try again with ``--force`` flag
+
+Missing Sprites
+~~~~~~~~~~~~~~~
+
+If specific sprites are missing:
+
+1. Run ``fle sprites --force`` to re-download
+2. Check the sprite directory exists
+3. Verify sprite names match Factorio prototypes
+
+Memory Issues
+~~~~~~~~~~~~~
+
+If you encounter memory issues:
+
+1. Don't pre-load all sprites
+2. Use on-demand loading
+3. Clear sprite cache periodically
+
+Image Format Issues
+~~~~~~~~~~~~~~~~~~~
+
+If image decoding fails:
+
+1. Verify base64 encoding is correct
+2. Check image format (should be PNG)
+3. Ensure data URL prefix is handled correctly
+
+Next Steps
+----------
+
+- Learn about :doc:`../tools/overview` for non-visual interactions
+- See the `Visual Agent example `_
+- Review :doc:`../environment/overview` for context
diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py
new file mode 100644
index 000000000..f920cea29
--- /dev/null
+++ b/docs/sphinx/source/conf.py
@@ -0,0 +1,92 @@
+# Configuration file for the Sphinx documentation builder.
+#
+# This file only contains a selection of the most common options. For a full
+# list see the documentation:
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
+
+# -- Path setup --------------------------------------------------------------
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+import os
+import sys
+from datetime import datetime
+sys.path.insert(0, os.path.abspath('../../..'))
+
+# -- Project information -----------------------------------------------------
+
+project = 'Factorio Learning Environment'
+copyright = f"{datetime.now().year}, FLE Team"
+author = 'FLE Team'
+release = '0.3.0'
+
+# -- General configuration ---------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+ 'sphinx.ext.autodoc',
+ 'sphinx.ext.napoleon',
+ 'sphinx.ext.viewcode',
+ 'sphinx.ext.intersphinx',
+ 'sphinx_autodoc_typehints',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path.
+exclude_patterns = []
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+html_theme = 'sphinx_rtd_theme'
+
+# Disable "View page source" links on all pages
+html_show_sourcelink = False
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# -- Extension configuration -------------------------------------------------
+
+# -- Options for autodoc extension -------------------------------------------
+autodoc_default_options = {
+ 'members': True,
+ 'member-order': 'bysource',
+ 'special-members': '__init__',
+ 'undoc-members': True,
+ 'exclude-members': '__weakref__'
+}
+
+# -- Options for intersphinx extension ---------------------------------------
+intersphinx_mapping = {
+ 'python': ('https://docs.python.org/3/', None),
+ 'numpy': ('https://numpy.org/doc/stable/', None),
+ 'gym': ('https://gymnasium.farama.org/', None),
+}
+
+# -- Options for Napoleon extension -----------------------------------------
+napoleon_google_docstring = True
+napoleon_numpy_docstring = True
+napoleon_include_init_with_doc = False
+napoleon_include_private_with_doc = False
+napoleon_include_special_with_doc = True
+napoleon_use_admonition_for_examples = False
+napoleon_use_admonition_for_notes = False
+napoleon_use_admonition_for_references = False
+napoleon_use_ivar = False
+napoleon_use_param = True
+napoleon_use_rtype = True
+napoleon_preprocess_types = False
+napoleon_type_aliases = None
+napoleon_attr_annotations = True
diff --git a/docs/sphinx/source/environment/gym_registry.rst b/docs/sphinx/source/environment/gym_registry.rst
new file mode 100644
index 000000000..d869c8200
--- /dev/null
+++ b/docs/sphinx/source/environment/gym_registry.rst
@@ -0,0 +1,335 @@
+Gym Environment Registry
+========================
+
+The Factorio Learning Environment uses a gym environment registry to automatically discover and register all available tasks. This allows you to use ``gym.make()`` to create environments and reference them by their environment IDs.
+
+Overview
+--------
+
+The registry system automatically discovers all task definitions in ``fle/eval/tasks/task_definitions/`` and registers them as gym environments. This means you can create any Factorio environment using the familiar ``gym.make()`` pattern.
+
+Features
+--------
+
+- **Automatic Discovery**: Automatically discovers all task definitions in ``fle/eval/tasks/task_definitions/``
+- **Gym Integration**: All environments are registered with ``gym`` and can be created using ``gym.make()``
+- **Task Metadata**: Provides access to task descriptions, configurations, and metadata
+- **Multi-agent Support**: Supports both single-agent and multi-agent environments
+- **Command-line Tools**: Built-in tools for exploring and testing environments
+
+Quick Start
+-----------
+
+1. List Available Environments
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ from fle.env.gym_env.registry import list_available_environments
+
+ # Get all available environment IDs
+ env_ids = list_available_environments()
+ print(f"Available environments: {env_ids}")
+
+Or use the command-line tool:
+
+.. code-block:: bash
+
+ python fle/env/gym_env/example_usage.py --list
+
+2. Create an Environment
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ import gym
+
+ # Create any available environment
+ env = gym.make("iron_ore_throughput")
+
+3. Use the Environment
+~~~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ from fle.env.gym_env.action import Action
+
+ # Reset the environment
+ obs = env.reset(options={'game_state': None})
+
+ # Take an action
+ action = Action(
+ agent_idx=0, # Which agent takes the action
+ code='print("Hello Factorio!")', # Python code to execute
+ game_state=None # Optional: game state to reset to before running code
+ )
+
+ # Execute the action
+ obs, reward, terminated, truncated, info = env.step(action)
+
+ # Clean up
+ env.close()
+
+Available Environments
+----------------------
+
+Throughput Tasks (Lab Play)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+All throughput tasks are defined in ``fle/eval/tasks/task_definitions/lab_play/throughput_tasks.py``. The 24 available tasks are:
+
+**Circuits**
+
+- ``advanced_circuit_throughput``
+- ``electronic_circuit_throughput``
+- ``processing_unit_throughput``
+
+**Science Packs**
+
+- ``automation_science_pack_throughput``
+- ``logistics_science_pack_throughput``
+- ``chemical_science_pack_throughput``
+- ``military_science_pack_throughput``
+- ``production_science_pack_throughput``
+- ``utility_science_pack_throughput``
+
+**Components**
+
+- ``battery_throughput``
+- ``engine_unit_throughput``
+- ``inserter_throughput``
+- ``iron_gear_wheel_throughput``
+- ``low_density_structure_throughput``
+
+**Raw Materials**
+
+- ``iron_ore_throughput``
+- ``iron_plate_throughput``
+- ``steel_plate_throughput``
+- ``plastic_bar_throughput``
+
+**Oil & Chemicals**
+
+- ``crude_oil_throughput``
+- ``petroleum_gas_throughput``
+- ``sulfuric_acid_throughput``
+- ``sulfur_throughput``
+
+**Military**
+
+- ``piercing_round_throughput``
+- ``stone_wall_throughput``
+
+.. note::
+ Most tasks require 16 items per 60 seconds; fluid tasks require 250 units per 60 seconds.
+
+Open Play Environment
+~~~~~~~~~~~~~~~~~~~~~
+
+- ``open_play`` - An unbounded task of building the largest possible factory
+
+Example Usage
+~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ import gym
+
+ # Create throughput environments
+ env = gym.make("iron_plate_throughput")
+ env = gym.make("automation_science_pack_throughput")
+ env = gym.make("crude_oil_throughput")
+
+ # Create open play environment
+ env = gym.make("open_play")
+
+Command-Line Tools
+------------------
+
+The ``example_usage.py`` script provides both interactive examples and command-line tools:
+
+.. code-block:: bash
+
+ # Run interactive examples
+ python fle/env/gym_env/example_usage.py
+
+ # List all environments
+ python fle/env/gym_env/example_usage.py --list
+
+ # Show detailed information
+ python fle/env/gym_env/example_usage.py --detail
+
+ # Search for specific environments
+ python fle/env/gym_env/example_usage.py --search iron
+
+ # Output in gym.make() format
+ python fle/env/gym_env/example_usage.py --gym-format
+
+Environment Interface
+---------------------
+
+Action Space
+~~~~~~~~~~~~
+
+.. code-block:: python
+
+ {
+ 'agent_idx': Discrete(instance.num_agents), # Index of the agent taking the action
+ 'game_state': Text(max_length=1000000), # Optional: game state to reset to
+ 'code': Text(max_length=10000) # Python code to execute
+ }
+
+Observation Space
+~~~~~~~~~~~~~~~~~
+
+The observation space includes:
+
+- ``raw_text``: Output from the last action
+- ``entities``: List of entities on the map
+- ``inventory``: Current inventory state
+- ``research``: Research progress and technologies
+- ``game_info``: Game state (tick, time, speed)
+- ``score``: Current score
+- ``flows``: Production statistics
+- ``task_verification``: Task completion status
+- ``messages``: Inter-agent messages
+- ``serialized_functions``: Available functions
+- ``task_info``: Information about the task
+- ``map_image``: Base64 encoded PNG image
+
+Methods
+~~~~~~~
+
+.. code-block:: python
+
+ # Reset the environment
+ reset(options: Dict[str, Any], seed: Optional[int] = None) -> Dict[str, Any]
+
+ # Take a step
+ step(action: Action) -> Tuple[Dict[str, Any], float, bool, bool, Dict[str, Any]]
+
+ # Clean up
+ close() -> None
+
+API Reference
+-------------
+
+Registry Functions
+~~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ # Returns a list of all registered environment IDs
+ list_available_environments() -> List[str]
+
+ # Returns detailed information about a specific environment
+ get_environment_info(env_id: str) -> Optional[Dict[str, Any]]
+
+ # Manually trigger environment discovery and registration
+ register_all_environments() -> None
+
+Environment Creation
+~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ # Creates a Factorio gym environment
+ gym.make(env_id: str, **kwargs) -> FactorioGymEnv
+
+Complete Example
+----------------
+
+Here's a complete example that demonstrates the full workflow:
+
+.. code-block:: python
+
+ import gym
+ from fle.env.gym_env.registry import list_available_environments, get_environment_info
+ from fle.env.gym_env.action import Action
+
+ # 1. List available environments
+ env_ids = list_available_environments()
+ print(f"Found {len(env_ids)} environments")
+
+ # 2. Get information about a specific environment
+ info = get_environment_info("iron_ore_throughput")
+ print(f"Description: {info['description']}")
+
+ # 3. Create the environment
+ env = gym.make("iron_ore_throughput")
+
+ # 4. Use the environment
+ obs = env.reset(options={'game_state': None})
+ print(f"Initial observation keys: {list(obs.keys())}")
+
+ # 5. Take actions
+ current_state = None
+ for step in range(5):
+ action = Action(
+ agent_idx=0,
+ game_state=current_state,
+ code=f'print("Step {step}: Hello Factorio!")'
+ )
+ obs, reward, terminated, truncated, info = env.step(action)
+ done = terminated or truncated
+ current_state = info['output_game_state']
+ print(f"Step {step}: Reward={reward}, Done={done}")
+
+ if done:
+ break
+
+ # 6. Clean up
+ env.close()
+
+Error Handling
+--------------
+
+The registry includes error handling for:
+
+- Missing task definition files
+- Invalid JSON configurations
+- Missing Factorio containers
+- Environment creation failures
+
+If an environment fails to load, a warning will be printed but the registry will continue to load other environments.
+
+Troubleshooting
+---------------
+
+Environment Creation Fails
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If ``gym.make()`` fails with connection errors:
+
+1. Ensure Factorio containers are running
+2. Check that the cluster setup is working
+3. Verify network connectivity
+
+No Environments Found
+~~~~~~~~~~~~~~~~~~~~~
+
+If no environments are listed:
+
+1. Check that the task definitions directory exists
+2. Verify JSON files are valid
+3. Check file permissions
+
+Import Errors
+~~~~~~~~~~~~~
+
+If you get import errors:
+
+1. Ensure you're running from the correct directory
+2. Check that all dependencies are installed
+3. Verify the Python path includes the project root
+
+Testing
+-------
+
+Run the test suite to verify the registry is working correctly:
+
+.. code-block:: bash
+
+ python fle/env/tests/gym_env/test_registry.py
+
+This registry system provides a clean, standardized interface for working with Factorio gym environments, making it easy to experiment with different tasks and integrate with existing gym-based frameworks.
diff --git a/docs/sphinx/source/environment/overview.rst b/docs/sphinx/source/environment/overview.rst
new file mode 100644
index 000000000..56320c8d8
--- /dev/null
+++ b/docs/sphinx/source/environment/overview.rst
@@ -0,0 +1,240 @@
+Environment Overview
+====================
+
+FLE is an agent evaluation environment built on the game of Factorio, a popular resource management simulation game.
+
+The REPL Pattern
+-----------------
+
+Agents interact with FLE through code synthesis using a **REPL** (Read-Eval-Print-Loop) pattern:
+
+1. **Observation**: The agent observes the world through the output streams (stderr/stdout) of their last program
+2. **Action**: The agent generates a Python program to perform their desired action
+3. **Feedback**: The environment executes the program, assigns variables, adds classes/functions to the namespace, and provides an output stream
+
+Example Interaction
+~~~~~~~~~~~~~~~~~~~
+
+**Action:**
+
+.. code-block:: python
+
+ # 1. Get iron patch and place mining drill
+ drill = place_entity(
+ entity=Prototype.MiningDrill,
+ position=nearest(Resource.IronOre),
+ direction=Direction.NORTH
+ )
+ # 2. Add output storage
+ chest = place_entity_next_to(
+ entity=Prototype.IronChest,
+ reference_position=drill.drop_position,
+ direction=Direction.SOUTH
+ )
+ # 3. Verify automation chain and observe entities
+ sleep(10) # Sleep for 10 seconds
+ assert drill.status == EntityStatus.WORKING
+ print(get_entities())
+
+**Feedback:**
+
+.. code-block:: python
+
+ >>> [ BurnerMiningDrill(fuel=Inventory({'coal': 4}),
+ >>> name='burner-mining-drill',
+ >>> direction=Direction.DOWN,
+ >>> position=Position(x=-28.0, y=-61.0),
+ >>> energy=2666.6666666667,
+ >>> tile_dimensions=TileDimensions(tile_width=2.0, tile_height=2.0),
+ >>> status=EntityStatus.WORKING,
+ >>> neighbours=[Entity(name='iron-chest', direction=DOWN, position=Position(x=-27.5 y=-59.5)],
+ >>> drop_position=Position(x=-27.5, y=-59.5),
+ >>> resources=[Ingredient(name='iron-ore', count=30000, type=None)]),
+ >>> Chest(name='iron-chest',
+ >>> direction=Direction.UP,
+ >>> position=Position(x=-27.5, y=-59.5),
+ >>> energy=0.0,
+ >>> tile_dimensions=TileDimensions(tile_width=1.0, tile_height=1.0),
+ >>> status=EntityStatus.NORMAL,
+ >>> inventory=Inventory({'iron-ore': 75}))]
+
+Available Tools
+---------------
+
+Agents are provided with the Python standard library and an API comprising :doc:`../tools/overview` that they can use.
+
+**Tools** are functions that:
+
+- Perform a game action
+- Return a typed object (e.g. an ``Inventory``)
+- Can be stored as a named **variable** in the Python namespace for later use
+
+The Namespace
+-------------
+
+The namespace acts as an **episodic symbolic memory system**. Saved objects represent an observation of the environment at the moment of query.
+
+This enables agents to:
+
+- Maintain complex state representations
+- Build hierarchical abstractions as factories scale
+- Reference previous observations and computations
+
+Observations
+------------
+
+Agents observe **stdout** and **stderr** - the output streams of their program.
+
+Agents may intentionally:
+
+- Print relevant objects to construct observations
+- Print computations and intermediate results
+- Use ``print()`` strategically to monitor state
+
+Error Handling
+--------------
+
+Mistakes in code or invalid operations raise typed **exceptions** with detailed context that is written to stderr.
+
+This enables agents to:
+
+- **Reactively debug** their programs after execution
+- **Proactively use** runtime assertions during execution to self-verify actions
+- Learn from detailed error messages
+
+Custom Functions and Classes
+-----------------------------
+
+Agents can enhance their internal representation of the game state by defining:
+
+1. **Utility functions** for reuse throughout an episode, to encapsulate previously successful logic
+2. **Classes** in the namespace to better organize the data retrieved from the game
+
+These definitions persist in the namespace across actions within an episode.
+
+Action Space
+------------
+
+The action space is defined as:
+
+.. code-block:: python
+
+ {
+ 'agent_idx': Discrete(instance.num_agents), # Index of the agent taking the action
+ 'game_state': Text(max_length=1000000), # Optional: game state to reset to
+ 'code': Text(max_length=10000) # Python code to execute
+ }
+
+Observation Space
+-----------------
+
+The observation space includes:
+
+- ``raw_text``: Output from the last action
+- ``entities``: List of entities on the map
+- ``inventory``: Current inventory state
+- ``research``: Research progress and technologies
+- ``game_info``: Game state (tick, time, speed)
+- ``score``: Current score
+- ``flows``: Production statistics
+- ``task_verification``: Task completion status
+- ``messages``: Inter-agent messages (for multi-agent scenarios)
+- ``serialized_functions``: Available functions
+- ``task_info``: Information about the task
+- ``map_image``: Base64 encoded PNG image
+
+Environment Methods
+-------------------
+
+Standard Gym Interface
+~~~~~~~~~~~~~~~~~~~~~~
+
+All FLE environments follow the standard OpenAI Gym interface:
+
+.. code-block:: python
+
+ # Reset the environment
+ obs = env.reset(options: Dict[str, Any], seed: Optional[int] = None) -> Dict[str, Any]
+
+ # Take a step
+ obs, reward, terminated, truncated, info = env.step(action: Action)
+
+ # Clean up
+ env.close()
+
+Architecture
+------------
+
+.. code-block:: text
+
+ ┌─────────────────┐
+ │ Agent │
+ │ (Synthesizes │
+ │ Python Code) │
+ └────────┬────────┘
+ │
+ ▼
+ ┌─────────────────────────────┐
+ │ Learning Environment │
+ │ ┌─────────────────────┐ │
+ │ │ Interpreter │ │
+ │ │ - Executes code │ │
+ │ │ - Manages │ │
+ │ │ namespace │ │
+ │ └──────┬──────────────┘ │
+ │ │ │
+ │ ┌──────▼──────────────┐ │
+ │ │ client.py │ │
+ │ │ (Tool Interface) │ │
+ │ └──────┬──────────────┘ │
+ └─────────┼──────────────────┘
+ │ Remote TCP Call
+ ▼
+ ┌─────────────────────────────┐
+ │ Factorio Server │
+ │ ┌─────────────────────┐ │
+ │ │ server.lua │ │
+ │ │ (Game Logic) │ │
+ │ └──────┬──────────────┘ │
+ │ │ │
+ │ ┌──────▼──────────────┐ │
+ │ │ Factorio Engine │ │
+ │ │ (Game Simulation) │ │
+ │ └─────────────────────┘ │
+ └─────────────────────────────┘
+
+Task Types
+----------
+
+FLE provides two main evaluation settings:
+
+Lab-Play
+~~~~~~~~
+
+24 structured tasks with fixed resources, testing specific capabilities:
+
+- **Circuits**: Advanced circuits, electronic circuits, processing units
+- **Science Packs**: Automation, logistics, chemical, military, production, utility
+- **Components**: Batteries, engines, inserters, gears, low density structures
+- **Raw Materials**: Iron ore, iron plates, steel plates, plastic bars
+- **Oil & Chemicals**: Crude oil, petroleum gas, sulfuric acid, sulfur
+- **Military**: Piercing rounds, stone walls
+
+Most tasks require 16 items per 60 seconds; fluid tasks require 250 units per 60 seconds.
+
+Open-Play
+~~~~~~~~~
+
+An unbounded task of building the largest possible factory on a procedurally generated map. This tests:
+
+- Long-term planning
+- Resource optimization
+- Scaling strategies
+- Error recovery
+
+Next Steps
+----------
+
+- Explore the :doc:`gym_registry` to see all available tasks
+- Learn about :doc:`../tools/overview` available to agents
+- See :doc:`../getting_started/quickstart` for usage examples
diff --git a/docs/sphinx/source/getting_started/installation.rst b/docs/sphinx/source/getting_started/installation.rst
new file mode 100644
index 000000000..01f78b09b
--- /dev/null
+++ b/docs/sphinx/source/getting_started/installation.rst
@@ -0,0 +1,139 @@
+Installation
+============
+
+Prerequisites
+-------------
+
+Before installing FLE, ensure you have:
+
+- **Docker**: Required for running Factorio server instances
+- **Python 3.10+**: The minimum Python version supported
+- **Factorio** (version 1.1.110): Only needed for optional rendering with graphics
+
+Installation Methods
+--------------------
+
+Core Installation
+~~~~~~~~~~~~~~~~~
+
+Install the core FLE SDK package:
+
+.. code-block:: bash
+
+ # Using pip
+ pip install factorio-learning-environment
+
+ # Using uv (recommended)
+ uv add factorio-learning-environment
+
+Installation with Optional Features
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+FLE provides several optional feature sets:
+
+.. code-block:: bash
+
+ # For running experiments
+ pip install factorio-learning-environment[eval]
+
+ # For MCP protocol support
+ pip install factorio-learning-environment[mcp]
+
+ # For PostgreSQL support
+ pip install factorio-learning-environment[psql]
+
+ # Install all features
+ pip install factorio-learning-environment[eval,mcp,psql]
+
+ # Using uv (recommended)
+ uv add factorio-learning-environment[eval]
+
+Client-side Setup (Optional)
+-----------------------------
+
+For rendering Factorio with graphics, you need to set up a Factorio client:
+
+1. **Purchase and Install Factorio**
+
+ - Purchase from the `official website `_ (recommended) or on Steam
+ - Download and install the game
+
+2. **Downgrade to Version 1.1.110**
+
+ - **Steam**: Right-click Factorio → Properties → Betas → Select ``1.1.110``
+ - **Important**: Uncheck the Space Age DLC if you have it, as it forces the 2.x branch
+
+3. **Activate Server License**
+
+ - Open the Factorio client
+ - Navigate to *Multiplayer*
+ - Connect to ``localhost:34197`` (default) or your configured address in Docker
+ - Once connected, you can safely disconnect. This step confirms your Factorio license with the server.
+
+API Key Configuration
+---------------------
+
+FLE supports multiple LLM providers for agent evaluation.
+
+Quick Setup (Recommended)
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Use the interactive setup script:
+
+.. code-block:: bash
+
+ python fle/eval/infra/setup_api_keys.py
+
+This script helps you:
+
+- Configure API keys for OpenAI, Anthropic, and other providers
+- Set up API key rotation for high-volume experiments
+- Generate provider-specific configuration files
+- Validate your API key setup
+
+Manual Setup
+~~~~~~~~~~~~
+
+Add your API keys to the ``.env`` file:
+
+.. code-block:: bash
+
+ # OpenAI
+ OPENAI_API_KEY=sk-...
+
+ # Anthropic
+ ANTHROPIC_API_KEY=sk-ant-...
+
+ # Additional providers as needed
+
+Advanced Configuration
+~~~~~~~~~~~~~~~~~~~~~~
+
+For large-scale experiments, you can set up API key rotation and provider-specific settings using the configuration files generated by ``setup_api_keys.py``.
+
+Initial Setup
+-------------
+
+When you run ``fle init`` or ``fle eval`` for the first time:
+
+- An ``.env`` file is automatically created
+- A ``configs/`` directory with example configurations is created
+
+Verification
+------------
+
+Verify your installation by starting the Factorio cluster:
+
+.. code-block:: bash
+
+ # Start Factorio cluster
+ fle cluster start
+
+ # Run evaluation trajectories (requires [eval] dependencies)
+ fle eval --config configs/gym_run_config.json
+
+Next Steps
+----------
+
+- Continue to :doc:`quickstart` to learn how to use FLE
+- See :doc:`troubleshooting` if you encounter issues
diff --git a/docs/sphinx/source/getting_started/quickstart.rst b/docs/sphinx/source/getting_started/quickstart.rst
new file mode 100644
index 000000000..657ad6c11
--- /dev/null
+++ b/docs/sphinx/source/getting_started/quickstart.rst
@@ -0,0 +1,194 @@
+Quickstart
+==========
+
+This guide will get you up and running with FLE in minutes.
+
+CLI Commands
+------------
+
+Starting the Factorio Cluster
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: bash
+
+ # Start Factorio cluster
+ fle cluster start
+
+Running Evaluations
+~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: bash
+
+ # Run evaluation trajectories (requires [eval] dependencies)
+ fle eval --config configs/gym_run_config.json
+
+.. note::
+ When you run ``fle init`` or ``fle eval`` for the first time, an ``.env`` file and a ``configs/`` directory with example configurations are created automatically.
+
+Basic Usage Example
+-------------------
+
+Here's a complete example demonstrating how to use FLE with the Gym interface:
+
+.. code-block:: python
+
+ import gym
+ from fle.env.gym_env.action import Action
+
+ # Create an environment
+ env = gym.make("iron_ore_throughput")
+
+ # Reset the environment
+ obs = env.reset(options={'game_state': None})
+
+ # Take an action
+ action = Action(
+ agent_idx=0, # Which agent takes the action
+ code='print("Hello Factorio!")', # Python code to execute
+ game_state=None # Optional: game state to reset to before running code
+ )
+
+ # Execute the action
+ obs, reward, terminated, truncated, info = env.step(action)
+
+ # Clean up
+ env.close()
+
+Understanding the REPL Pattern
+-------------------------------
+
+Agents interact with FLE through a **REPL** (Read-Eval-Print-Loop) pattern:
+
+1. **Observation**: The agent observes the world through the output streams (stderr/stdout) of their last program
+2. **Action**: The agent generates a Python program to perform their desired action
+3. **Feedback**: The environment executes the program and provides an output stream
+
+Example Action-Feedback Cycle
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+**Action:**
+
+.. code-block:: python
+
+ # 1. Get iron patch and place mining drill
+ drill = place_entity(
+ entity=Prototype.MiningDrill,
+ position=nearest(Resource.IronOre),
+ direction=Direction.NORTH
+ )
+ # 2. Add output storage
+ chest = place_entity_next_to(
+ entity=Prototype.IronChest,
+ reference_position=drill.drop_position,
+ direction=Direction.SOUTH
+ )
+ # 3. Verify automation chain and observe entities
+ sleep(10) # Sleep for 10 seconds
+ assert drill.status == EntityStatus.WORKING
+ print(get_entities())
+
+**Feedback:**
+
+.. code-block:: python
+
+ >>> [ BurnerMiningDrill(fuel=Inventory({'coal': 4}),
+ >>> name='burner-mining-drill',
+ >>> direction=Direction.DOWN,
+ >>> position=Position(x=-28.0, y=-61.0),
+ >>> energy=2666.6666666667,
+ >>> tile_dimensions=TileDimensions(tile_width=2.0, tile_height=2.0),
+ >>> status=EntityStatus.WORKING,
+ >>> neighbours=[Entity(name='iron-chest', direction=DOWN, position=Position(x=-27.5 y=-59.5)],
+ >>> drop_position=Position(x=-27.5, y=-59.5),
+ >>> resources=[Ingredient(name='iron-ore', count=30000, type=None)]),
+ >>> Chest(name='iron-chest',
+ >>> direction=Direction.UP,
+ >>> position=Position(x=-27.5, y=-59.5),
+ >>> energy=0.0,
+ >>> tile_dimensions=TileDimensions(tile_width=1.0, tile_height=1.0),
+ >>> status=EntityStatus.NORMAL,
+ >>> inventory=Inventory({'iron-ore': 75}))]
+
+Listing Available Environments
+-------------------------------
+
+.. code-block:: python
+
+ from fle.env.gym_env.registry import list_available_environments
+
+ # Get all available environment IDs
+ env_ids = list_available_environments()
+ print(f"Available environments: {env_ids}")
+
+Or use the command-line tool:
+
+.. code-block:: bash
+
+ python fle/env/gym_env/example_usage.py --list
+
+Creating Different Environments
+--------------------------------
+
+.. code-block:: python
+
+ import gym
+
+ # Create throughput environments
+ env = gym.make("iron_plate_throughput")
+ env = gym.make("automation_science_pack_throughput")
+ env = gym.make("crude_oil_throughput")
+
+ # Create open play environment
+ env = gym.make("open_play")
+
+Complete Workflow Example
+--------------------------
+
+Here's a complete example demonstrating the full workflow:
+
+.. code-block:: python
+
+ import gym
+ from fle.env.gym_env.registry import list_available_environments, get_environment_info
+ from fle.env.gym_env.action import Action
+
+ # 1. List available environments
+ env_ids = list_available_environments()
+ print(f"Found {len(env_ids)} environments")
+
+ # 2. Get information about a specific environment
+ info = get_environment_info("iron_ore_throughput")
+ print(f"Description: {info['description']}")
+
+ # 3. Create the environment
+ env = gym.make("iron_ore_throughput")
+
+ # 4. Use the environment
+ obs = env.reset(options={'game_state': None})
+ print(f"Initial observation keys: {list(obs.keys())}")
+
+ # 5. Take actions
+ current_state = None
+ for step in range(5):
+ action = Action(
+ agent_idx=0,
+ game_state=current_state,
+ code=f'print("Step {step}: Hello Factorio!")'
+ )
+ obs, reward, terminated, truncated, info = env.step(action)
+ done = terminated or truncated
+ current_state = info['output_game_state']
+ print(f"Step {step}: Reward={reward}, Done={done}")
+
+ if done:
+ break
+
+ # 6. Clean up
+ env.close()
+
+Next Steps
+----------
+
+- Learn about the :doc:`../environment/overview` and how agents interact with it
+- Explore the :doc:`../tools/overview` available to agents
+- Check out the :doc:`../environment/gym_registry` for available tasks
diff --git a/docs/sphinx/source/getting_started/troubleshooting.rst b/docs/sphinx/source/getting_started/troubleshooting.rst
new file mode 100644
index 000000000..361ea19b4
--- /dev/null
+++ b/docs/sphinx/source/getting_started/troubleshooting.rst
@@ -0,0 +1,214 @@
+Troubleshooting
+===============
+
+This page addresses common issues you may encounter when using FLE.
+
+Common Issues
+-------------
+
+"No valid programs found for version X"
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+**Symptom**: You see this message during initialization.
+
+**Solution**: This is normal during initialization. The system will start generating programs shortly. No action needed.
+
+Database Connection Errors
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+**Symptom**: Errors connecting to the database when running evaluations.
+
+**Solution**:
+
+1. Verify your database configuration in the ``.env`` file
+2. Ensure the database exists
+3. For SQLite: Check that the directory for the database file exists
+4. For PostgreSQL: Verify the database server is running
+
+API Key Errors
+~~~~~~~~~~~~~~
+
+**Symptom**: Authentication errors when running agent evaluations.
+
+**Solution**:
+
+1. Run the API key setup script:
+
+ .. code-block:: bash
+
+ python fle/eval/infra/setup_api_keys.py
+
+2. Verify your API keys are correctly set in the ``.env`` file
+3. Check that you're using the correct provider (OpenAI, Anthropic, etc.)
+
+Docker Issues
+~~~~~~~~~~~~~
+
+**Symptom**: Permission denied or Docker connection errors.
+
+**Solution**:
+
+1. Ensure Docker is installed and running
+2. Verify your user has permission to run Docker without sudo:
+
+ .. code-block:: bash
+
+ sudo usermod -aG docker $USER
+
+3. Log out and log back in for the group change to take effect
+4. Test Docker access:
+
+ .. code-block:: bash
+
+ docker ps
+
+Connection Issues
+~~~~~~~~~~~~~~~~~
+
+**Symptom**: Cannot connect to Factorio server.
+
+**Solution**:
+
+1. Make sure the Factorio server is running:
+
+ .. code-block:: bash
+
+ fle cluster start
+
+2. Check that ports are properly configured
+3. Verify Docker containers are running:
+
+ .. code-block:: bash
+
+ docker ps
+
+4. Check Docker logs for errors:
+
+ .. code-block:: bash
+
+ docker logs
+
+Environment Creation Fails
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+**Symptom**: ``gym.make()`` fails with connection errors.
+
+**Solution**:
+
+1. Ensure Factorio containers are running
+2. Check that the cluster setup is working
+3. Verify network connectivity
+
+No Environments Found
+~~~~~~~~~~~~~~~~~~~~~
+
+**Symptom**: ``list_available_environments()`` returns an empty list.
+
+**Solution**:
+
+1. Check that the task definitions directory exists
+2. Verify JSON files in ``fle/eval/tasks/task_definitions/`` are valid
+3. Check file permissions
+4. Ensure you're running from the correct directory
+
+Import Errors
+~~~~~~~~~~~~~
+
+**Symptom**: ``ModuleNotFoundError`` or import errors.
+
+**Solution**:
+
+1. Ensure you're running from the correct directory
+2. Check that all dependencies are installed:
+
+ .. code-block:: bash
+
+ pip install factorio-learning-environment[eval]
+
+3. Verify the Python path includes the project root
+4. Try reinstalling the package:
+
+ .. code-block:: bash
+
+ pip install --force-reinstall factorio-learning-environment
+
+Space Age DLC Issues
+~~~~~~~~~~~~~~~~~~~~
+
+**Symptom**: Factorio client is on version 2.x instead of 1.1.110.
+
+**Solution**:
+
+1. Open Steam library
+2. Right-click Factorio → Properties
+3. Navigate to DLC section
+4. **Uncheck Space Age DLC** (this forces the 2.x branch)
+5. Go to Betas tab
+6. Select version ``1.1.110``
+
+Testing Your Installation
+--------------------------
+
+Run the test suite to verify everything is working:
+
+.. code-block:: bash
+
+ # Test the gym registry
+ python fle/env/tests/gym_env/test_registry.py
+
+ # List available environments
+ python fle/env/gym_env/example_usage.py --list
+
+ # Run with detailed output
+ python fle/env/gym_env/example_usage.py --detail
+
+Getting Help
+------------
+
+If you continue to experience issues:
+
+1. Check the `GitHub Issues `_
+2. Join the `Discord (#factorio-learning-env) `_
+3. Review the :doc:`../project_structure` to understand the codebase layout
+
+Debugging Tips
+--------------
+
+Enable Verbose Logging
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Set environment variables for more detailed output:
+
+.. code-block:: bash
+
+ export FLE_LOG_LEVEL=DEBUG
+
+Check Docker Logs
+~~~~~~~~~~~~~~~~~
+
+View logs from Factorio containers:
+
+.. code-block:: bash
+
+ # List running containers
+ docker ps
+
+ # View logs for a specific container
+ docker logs
+
+ # Follow logs in real-time
+ docker logs -f
+
+Verify Environment Variables
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Check that your ``.env`` file is properly loaded:
+
+.. code-block:: python
+
+ import os
+ from dotenv import load_dotenv
+
+ load_dotenv()
+ print(os.getenv('OPENAI_API_KEY')) # Should show your API key (masked)
+ print(os.getenv('FLE_DB_TYPE')) # Should show sqlite or postgres
diff --git a/docs/sphinx/source/index.rst b/docs/sphinx/source/index.rst
new file mode 100644
index 000000000..affbba0e0
--- /dev/null
+++ b/docs/sphinx/source/index.rst
@@ -0,0 +1,76 @@
+Factorio Learning Environment
+==============================
+
+.. raw:: html
+
+
+ Leaderboard |
+ Paper |
+ Website |
+ Discord (#factorio-learning-env)
+
+
+An open source framework for developing and evaluating LLM agents in the game of `Factorio `_.
+
+.. raw:: html
+
+
+
+
+
+ Claude Opus 4.1 Plays Factorio
+
+Why FLE?
+--------
+
+We provide two settings:
+
+1. **Lab-play**: 24 structured tasks with fixed resources.
+2. **Open-play**: An unbounded task of building the largest possible factory on a procedurally generated map.
+
+Our results demonstrate that models still lack strong spatial reasoning. In lab-play, we find that while LLMs
+exhibit promising short-horizon skills, they are unable to operate effectively in constrained environments, reflecting limitations in error analysis. In open-play, while LLMs discover automation strategies that improve growth (e.g electric-powered drilling), they fail to achieve complex automation (e.g electronic-circuit manufacturing).
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Getting Started
+
+ getting_started/installation
+ getting_started/quickstart
+ getting_started/troubleshooting
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Environment
+
+ environment/overview
+ environment/gym_registry
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Tools
+
+ tools/overview
+ tools/core_tools
+ tools/custom_tools
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Advanced Topics
+
+ advanced/mcp
+ advanced/sprites
+ advanced/database
+
+.. toctree::
+ :maxdepth: 1
+ :caption: Reference
+
+ project_structure
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/docs/sphinx/source/project_structure.rst b/docs/sphinx/source/project_structure.rst
new file mode 100644
index 000000000..d165cd55a
--- /dev/null
+++ b/docs/sphinx/source/project_structure.rst
@@ -0,0 +1,317 @@
+Project Structure
+=================
+
+This page provides an overview of the FLE codebase organization.
+
+Directory Layout
+----------------
+
+.. code-block:: text
+
+ factorio-learning-environment/
+ ├── .github/ # GitHub workflows and CI/CD
+ ├── .fle/ # Runtime data (saves, scenarios, trajectory logs)
+ ├── docs/ # Documentation and website
+ ├── examples/ # Example agent implementations
+ ├── fle/ # Main codebase
+ │ ├── agents/ # Agent implementations
+ │ ├── cluster/ # Docker orchestration and scenarios
+ │ ├── commons/ # Shared utilities and models
+ │ ├── configs/ # Configuration files
+ │ ├── data/ # Data files and replays
+ │ ├── env/ # Core environment
+ │ ├── eval/ # Evaluation framework
+ │ ├── run.py # CLI entry point
+ │ └── server.py # RCON server
+ ├── tests/ # Test suite
+ ├── .example.env # Environment variables template
+ ├── BUILD.md # Build instructions
+ ├── CONTRIBUTING.md # Contribution guidelines
+ ├── pyproject.toml # Python project config
+ └── uv.lock # Dependency lock file
+
+Core Directories
+----------------
+
+fle/agents/
+~~~~~~~~~~~
+
+Agent implementations including:
+
+- ``BasicAgent``: Simple text-based agent
+- ``VisualAgent``: Vision-enabled agent
+- ``MultiAgent``: Multi-agent coordination
+- Base classes and interfaces
+
+**Key Files:**
+
+- ``agent_abc.py``: Abstract base class for agents
+- ``models.py``: Agent configuration models
+
+fle/cluster/
+~~~~~~~~~~~~
+
+Docker orchestration and scenario management:
+
+- Factorio server containers
+- Docker Compose configurations
+- Scenario definitions
+- Server management utilities
+
+**Key Files:**
+
+- ``docker-compose.yml``: Container orchestration
+- ``scenarios/``: Pre-built game scenarios
+
+fle/commons/
+~~~~~~~~~~~~
+
+Shared utilities and models used across the codebase:
+
+- Data models (Position, Entity, Inventory, etc.)
+- Utility functions
+- Constants and enumerations
+- Database client interface
+
+**Key Files:**
+
+- ``models.py``: Core data models
+- ``db_client.py``: Database abstraction layer
+- ``utils.py``: Helper functions
+
+fle/env/
+~~~~~~~~
+
+Core environment implementation:
+
+.. code-block:: text
+
+ env/
+ ├── gym_env/ # OpenAI Gym interface
+ │ ├── action.py # Action definitions
+ │ ├── observation.py # Observation space
+ │ ├── registry.py # Environment registry
+ │ └── gym_env.py # Main gym environment
+ ├── tools/ # Agent-accessible tools
+ │ ├── agent/ # Agent tools
+ │ └── admin/ # Admin tools
+ ├── protocols/ # Communication protocols
+ │ ├── _mcp/ # Model Context Protocol
+ │ └── a2a/ # Agent-to-Agent protocol
+ ├── exceptions/ # Custom exceptions
+ ├── entities.py # Entity definitions
+ ├── instance.py # Game instance management
+ └── namespace.py # Python namespace management
+
+**Key Components:**
+
+- **gym_env/**: Standard gym interface for RL frameworks
+- **tools/**: All agent-callable functions
+- **protocols/**: Communication layer implementations
+- **exceptions/**: Typed exceptions for error handling
+
+fle/eval/
+~~~~~~~~~
+
+Evaluation framework for running experiments:
+
+.. code-block:: text
+
+ eval/
+ ├── algorithms/ # Search algorithms
+ │ ├── beam_search.py # Beam search implementation
+ │ ├── mcts.py # Monte Carlo Tree Search
+ │ └── independent.py # Independent evaluation
+ ├── analysis/ # Analysis tools
+ ├── tasks/ # Task definitions
+ │ └── task_definitions/ # JSON task configs
+ │ ├── lab_play/ # Structured tasks
+ │ └── open_play/ # Open-ended tasks
+ ├── infra/ # Infrastructure
+ │ ├── setup_api_keys.py # API key configuration
+ │ └── cluster_manager.py # Cluster management
+ └── evaluator.py # Main evaluation logic
+
+**Key Files:**
+
+- ``evaluator.py``: Runs agent evaluations
+- ``tasks/task_definitions/``: Task configurations
+- ``algorithms/``: Search and optimization algorithms
+
+tests/
+~~~~~~
+
+Comprehensive test suite:
+
+.. code-block:: text
+
+ tests/
+ ├── actions/ # Tool tests
+ ├── benchmarks/ # Performance benchmarks
+ ├── functional/ # End-to-end tests
+ ├── gym_env/ # Gym interface tests
+ └── integration/ # Integration tests
+
+Configuration Files
+-------------------
+
+pyproject.toml
+~~~~~~~~~~~~~~
+
+Python project configuration:
+
+- Package metadata
+- Dependencies
+- Optional feature groups (``[eval]``, ``[mcp]``, ``[psql]``)
+- Build system configuration
+
+.env
+~~~~
+
+Environment variables (created from ``.example.env``):
+
+- API keys (OpenAI, Anthropic, etc.)
+- Database configuration
+- Cluster settings
+- Feature flags
+
+Key Modules
+-----------
+
+fle/run.py
+~~~~~~~~~~
+
+CLI entry point providing commands:
+
+- ``fle cluster start``: Start Factorio cluster
+- ``fle eval``: Run evaluations
+- ``fle sprites``: Manage sprites
+- ``fle init``: Initialize configuration
+
+fle/server.py
+~~~~~~~~~~~~~
+
+RCON server for communicating with Factorio instances:
+
+- Handles tool invocations
+- Manages game state
+- Executes Lua commands
+
+fle/env/instance.py
+~~~~~~~~~~~~~~~~~~~
+
+Manages individual Factorio game instances:
+
+- Instance lifecycle
+- State management
+- Connection handling
+- Resource cleanup
+
+fle/env/namespace.py
+~~~~~~~~~~~~~~~~~~~~
+
+Python namespace management for agent code:
+
+- Variable storage
+- Function definitions
+- Class definitions
+- Namespace isolation
+
+Data Flow
+---------
+
+.. code-block:: text
+
+ Agent
+ │
+ ├─> Synthesizes Python Code
+ │
+ ▼
+ Environment (gym_env)
+ │
+ ├─> Interprets Code
+ │
+ ├─> Executes Tools (client.py)
+ │ │
+ │ ├─> Calls server.py (RCON)
+ │ │ │
+ │ │ ├─> Executes server.lua
+ │ │ │ │
+ │ │ │ └─> Factorio Engine
+ │ │ │
+ │ │ └─> Returns Results
+ │ │
+ │ └─> Returns Typed Objects
+ │
+ ├─> Updates Namespace
+ │
+ └─> Returns Observation
+ │
+ └─> Agent
+
+Important Files
+---------------
+
+Core Environment
+~~~~~~~~~~~~~~~~
+
+- ``fle/env/gym_env/gym_env.py``: Main gym environment
+- ``fle/env/instance.py``: Game instance management
+- ``fle/env/namespace.py``: Python namespace handling
+
+Tools System
+~~~~~~~~~~~~
+
+- ``fle/env/tools/tool.py``: Base tool class
+- ``fle/env/tools/agent/**/client.py``: Tool implementations
+- ``fle/server.py``: Server-side execution
+
+Registry & Tasks
+~~~~~~~~~~~~~~~~
+
+- ``fle/env/gym_env/registry.py``: Environment registry
+- ``fle/eval/tasks/task_definitions/``: Task JSON files
+- ``fle/eval/evaluator.py``: Evaluation orchestration
+
+Development Workflow
+--------------------
+
+Adding a New Tool
+~~~~~~~~~~~~~~~~~
+
+1. Create directory: ``fle/env/tools/agent/my_tool/``
+2. Add ``client.py``, ``server.lua``, ``agent.md``
+3. Create test: ``tests/actions/test_my_tool.py``
+4. Tool is automatically discovered
+
+Adding a New Task
+~~~~~~~~~~~~~~~~~
+
+1. Create JSON file: ``fle/eval/tasks/task_definitions/my_task.json``
+2. Task is automatically registered
+3. Access via: ``gym.make("my_task")``
+
+Running Tests
+~~~~~~~~~~~~~
+
+.. code-block:: bash
+
+ # Run all tests
+ pytest tests/
+
+ # Run specific test file
+ pytest tests/actions/test_place_entity.py
+
+ # Run with coverage
+ pytest --cov=fle tests/
+
+Building Documentation
+~~~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: bash
+
+ cd docs/sphinx
+ make html
+
+ # View docs
+ open build/html/index.html
\ No newline at end of file
diff --git a/docs/sphinx/source/tools/core_tools.rst b/docs/sphinx/source/tools/core_tools.rst
new file mode 100644
index 000000000..e17d58675
--- /dev/null
+++ b/docs/sphinx/source/tools/core_tools.rst
@@ -0,0 +1,563 @@
+Core Tools Reference
+====================
+
+This page provides a comprehensive reference for all core tools available to agents.
+
+Inventory Management
+--------------------
+
+inspect_inventory
+~~~~~~~~~~~~~~~~~
+
+Checks contents of player or entity inventories.
+
+**Features:**
+
+- Supports various inventory types (chests, furnaces, etc.)
+- Returns ``Inventory`` object with count methods
+- Can query specific items
+
+**Example:**
+
+.. code-block:: python
+
+ # Check player inventory
+ inventory = inspect_inventory()
+ print(f"Iron plates: {inventory['iron-plate']}")
+
+ # Check entity inventory
+ chest = get_entity(Prototype.IronChest, position)
+ inventory = inspect_inventory(chest)
+
+insert_item
+~~~~~~~~~~~
+
+Places items from player inventory into entities.
+
+**Features:**
+
+- Works with machines, chests, belts
+- Validates item compatibility
+- Returns updated entity
+
+**Example:**
+
+.. code-block:: python
+
+ # Insert coal into a furnace
+ furnace = get_entity(Prototype.StoneFurnace, furnace_position)
+ insert_item(Prototype.Coal, furnace, quantity=10)
+
+extract_item
+~~~~~~~~~~~~
+
+Removes items from entity inventories.
+
+**Features:**
+
+- Supports all inventory types
+- Auto-transfers to player inventory
+- Returns quantity extracted
+
+**Example:**
+
+.. code-block:: python
+
+ # Extract iron plates from a chest
+ chest = get_entity(Prototype.IronChest, chest_position)
+ extracted = extract_item(Prototype.IronPlate, chest, quantity=50)
+ print(f"Extracted {extracted} iron plates")
+
+Entity Manipulation
+-------------------
+
+place_entity
+~~~~~~~~~~~~
+
+Places entities in the world.
+
+**Features:**
+
+- Handles direction and positioning
+- Validates placement requirements
+- Returns placed ``Entity`` object
+
+**Example:**
+
+.. code-block:: python
+
+ # Place a mining drill
+ drill = place_entity(
+ entity=Prototype.MiningDrill,
+ position=Position(x=10, y=20),
+ direction=Direction.NORTH
+ )
+
+place_entity_next_to
+~~~~~~~~~~~~~~~~~~~~
+
+Places entities relative to others.
+
+**Features:**
+
+- Automatic spacing/alignment
+- Handles entity dimensions
+- Supports all entity types
+
+**Example:**
+
+.. code-block:: python
+
+ # Place a chest next to a drill
+ chest = place_entity_next_to(
+ entity=Prototype.IronChest,
+ reference_position=drill.drop_position,
+ direction=Direction.SOUTH
+ )
+
+pickup_entity
+~~~~~~~~~~~~~
+
+Removes entities from the world.
+
+**Features:**
+
+- Returns items to inventory
+- Handles entity groups
+- Supports all placeable items
+
+**Example:**
+
+.. code-block:: python
+
+ # Pick up a mining drill
+ drill = get_entity(Prototype.BurnerMiningDrill, position)
+ pickup_entity(drill)
+
+rotate_entity
+~~~~~~~~~~~~~
+
+Changes entity orientation.
+
+**Features:**
+
+- Affects entity behavior (e.g., inserter direction)
+- Validates rotation rules
+- Returns updated entity
+
+**Example:**
+
+.. code-block:: python
+
+ # Rotate an inserter to face a different direction
+ inserter = get_entity(Prototype.Inserter, position)
+ rotate_entity(inserter, Direction.EAST)
+
+get_entity
+~~~~~~~~~~
+
+Retrieves entity objects at positions.
+
+**Features:**
+
+- Updates stale references
+- Returns typed ``Entity`` objects
+- Handles all entity types
+
+**Example:**
+
+.. code-block:: python
+
+ # Get a chest at a specific position
+ chest = get_entity(Prototype.IronChest, Position(x=10, y=20))
+
+get_entities
+~~~~~~~~~~~~
+
+Finds multiple entities in an area.
+
+**Features:**
+
+- Supports filtering by type
+- Returns ``List[Entity]``
+- Groups connected entities
+
+**Example:**
+
+.. code-block:: python
+
+ # Get all entities
+ entities = get_entities()
+
+ # Get entities by type
+ drills = get_entities(prototype=Prototype.BurnerMiningDrill)
+
+Resource Operations
+-------------------
+
+nearest
+~~~~~~~
+
+Locates closest resources/entities.
+
+**Features:**
+
+- Finds ores, water, trees
+- Returns ``Position`` object
+- 500 tile search radius
+
+**Example:**
+
+.. code-block:: python
+
+ # Find nearest iron ore
+ iron_position = nearest(Resource.IronOre)
+
+ # Find nearest water
+ water_position = nearest(Resource.Water)
+
+get_resource_patch
+~~~~~~~~~~~~~~~~~~
+
+Analyzes resource deposits.
+
+**Features:**
+
+- Returns size and boundaries
+- Supports all resource types
+- Includes total resource amount
+
+**Example:**
+
+.. code-block:: python
+
+ # Get information about an iron ore patch
+ patch = get_resource_patch(Resource.IronOre, position)
+ print(f"Patch size: {patch.size}")
+ print(f"Total iron: {patch.amount}")
+
+harvest_resource
+~~~~~~~~~~~~~~~~
+
+Gathers resources from the world.
+
+**Features:**
+
+- Supports ores, trees, rocks
+- Auto-collects to inventory
+- Returns amount harvested
+
+**Example:**
+
+.. code-block:: python
+
+ # Harvest iron ore manually
+ iron_position = nearest(Resource.IronOre)
+ harvested = harvest_resource(iron_position, quantity=50)
+
+Connections
+-----------
+
+connect_entities
+~~~~~~~~~~~~~~~~
+
+Creates connections between entities.
+
+**Features:**
+
+- Handles belts, pipes, power
+- Automatic pathfinding
+- Returns connection group
+
+**Example:**
+
+.. code-block:: python
+
+ # Connect a drill to a chest with a transport belt
+ connection = connect_entities(
+ drill.drop_position,
+ chest.position,
+ connection_type=Prototype.TransportBelt
+ )
+
+get_connection_amount
+~~~~~~~~~~~~~~~~~~~~~
+
+Calculates required connection items.
+
+**Features:**
+
+- Pre-planning tool
+- Works with all connection types
+- Returns item count needed
+
+**Example:**
+
+.. code-block:: python
+
+ # Calculate how many belts are needed
+ amount = get_connection_amount(
+ start_position=drill.drop_position,
+ end_position=chest.position,
+ connection_type=Prototype.TransportBelt
+ )
+ print(f"Need {amount} belts")
+
+Crafting & Research
+-------------------
+
+craft_item
+~~~~~~~~~~
+
+Creates items from components.
+
+**Features:**
+
+- Handles recursive crafting
+- Validates technology requirements
+- Returns crafted amount
+
+**Example:**
+
+.. code-block:: python
+
+ # Craft 10 iron gear wheels
+ crafted = craft_item(Prototype.IronGearWheel, quantity=10)
+
+get_prototype_recipe
+~~~~~~~~~~~~~~~~~~~~
+
+Retrieves crafting requirements.
+
+**Features:**
+
+- Shows ingredients/products
+- Includes crafting time
+- Returns ``Recipe`` object
+
+**Example:**
+
+.. code-block:: python
+
+ # Get recipe for electronic circuits
+ recipe = get_prototype_recipe(Prototype.ElectronicCircuit)
+ print(f"Ingredients: {recipe.ingredients}")
+ print(f"Crafting time: {recipe.energy}")
+
+set_entity_recipe
+~~~~~~~~~~~~~~~~~
+
+Configures machine crafting recipes.
+
+**Features:**
+
+- Works with assemblers/chemical plants
+- Validates recipe requirements
+- Returns updated entity
+
+**Example:**
+
+.. code-block:: python
+
+ # Set an assembling machine to craft iron gear wheels
+ assembler = get_entity(Prototype.AssemblingMachine1, position)
+ set_entity_recipe(assembler, Prototype.IronGearWheel)
+
+set_research
+~~~~~~~~~~~~
+
+Initiates technology research.
+
+**Features:**
+
+- Validates prerequisites
+- Returns required ingredients
+- Handles research queue
+
+**Example:**
+
+.. code-block:: python
+
+ # Start researching automation
+ research = set_research(Technology.Automation)
+
+get_research_progress
+~~~~~~~~~~~~~~~~~~~~~
+
+Monitors research status.
+
+**Features:**
+
+- Shows remaining requirements
+- Tracks progress percentage
+- Returns ingredient list
+
+**Example:**
+
+.. code-block:: python
+
+ # Check research progress
+ progress = get_research_progress()
+ print(f"Current research: {progress.name}")
+ print(f"Progress: {progress.level}%")
+
+Movement & Utility
+------------------
+
+move_to
+~~~~~~~
+
+Moves player to position.
+
+**Features:**
+
+- Pathfinds around obstacles
+- Can place items while moving
+- Returns final position
+
+**Example:**
+
+.. code-block:: python
+
+ # Move to iron ore patch
+ iron_position = nearest(Resource.IronOre)
+ move_to(iron_position)
+
+nearest_buildable
+~~~~~~~~~~~~~~~~~
+
+Finds valid building locations.
+
+**Features:**
+
+- Respects entity dimensions
+- Handles resource requirements
+- Returns buildable position
+
+**Example:**
+
+.. code-block:: python
+
+ # Find a buildable position near iron ore
+ buildable_pos = nearest_buildable(
+ resource=Resource.IronOre,
+ entity=Prototype.BurnerMiningDrill
+ )
+
+sleep
+~~~~~
+
+Pauses execution.
+
+**Features:**
+
+- Waits for actions to complete
+- Adapts to game speed
+- Maximum 15 second duration
+
+**Example:**
+
+.. code-block:: python
+
+ # Wait for 5 seconds for production to occur
+ sleep(5)
+
+ # Check drill status after waiting
+ drill = get_entity(Prototype.BurnerMiningDrill, drill_position)
+ print(f"Drill status: {drill.status}")
+
+launch_rocket
+~~~~~~~~~~~~~
+
+Controls rocket silo launches.
+
+**Features:**
+
+- Validates launch requirements
+- Handles launch sequence
+- Returns updated silo state
+
+**Example:**
+
+.. code-block:: python
+
+ # Launch a rocket
+ silo = get_entity(Prototype.RocketSilo, silo_position)
+ launch_rocket(silo)
+
+Output
+------
+
+print
+~~~~~
+
+Outputs debug information to stdout.
+
+**Features:**
+
+- Supports various object types
+- Useful for monitoring state
+- Returns formatted string
+
+**Example:**
+
+.. code-block:: python
+
+ # Print entity information
+ drill = get_entity(Prototype.BurnerMiningDrill, position)
+ print(f"Drill: {drill}")
+ print(f"Status: {drill.status}")
+ print(f"Position: {drill.position}")
+
+ # Print inventory
+ inventory = inspect_inventory()
+ print(f"Inventory: {inventory}")
+
+Best Practices
+--------------
+
+1. **Store Results**: Save tool results as variables for later reference
+
+ .. code-block:: python
+
+ my_drill = place_entity(...)
+ # Later...
+ print(my_drill.status)
+
+2. **Check Status**: Verify entity status after operations
+
+ .. code-block:: python
+
+ drill = place_entity(...)
+ sleep(5)
+ assert drill.status == EntityStatus.WORKING
+
+3. **Handle Errors**: Use try-except for error handling
+
+ .. code-block:: python
+
+ try:
+ drill = place_entity(...)
+ except InvalidEntityPlacementException as e:
+ print(f"Placement failed: {e}")
+
+4. **Print for Debugging**: Use ``print()`` to observe state
+
+ .. code-block:: python
+
+ print(f"Entities: {get_entities()}")
+ print(f"Inventory: {inspect_inventory()}")
+
+5. **Wait for Actions**: Use ``sleep()`` to allow time for completion
+
+ .. code-block:: python
+
+ place_entity(...)
+ sleep(10) # Wait for production
+
+Next Steps
+----------
+
+- Learn how to :doc:`custom_tools` for specialized functionality
+- Review :doc:`overview` for architectural details
+- See :doc:`../getting_started/quickstart` for usage examples
diff --git a/docs/sphinx/source/tools/custom_tools.rst b/docs/sphinx/source/tools/custom_tools.rst
new file mode 100644
index 000000000..865712cdc
--- /dev/null
+++ b/docs/sphinx/source/tools/custom_tools.rst
@@ -0,0 +1,454 @@
+Creating Custom Tools
+=====================
+
+This guide explains how to create custom tools for FLE to extend agent capabilities with specialized functionality.
+
+Overview
+--------
+
+A custom tool requires three components:
+
+1. **agent.md**: Documentation for the agent
+2. **client.py**: Python interface
+3. **server.lua**: Lua implementation
+
+Tool Structure
+--------------
+
+Tools live in ``fle/env/tools/``:
+
+.. code-block:: text
+
+ fle/env/tools/
+ ├── admin/ # Non-agent accessible tools
+ └── agent/ # Agent-accessible tools
+ └── my_tool/ # Your custom tool
+ ├── agent.md
+ ├── client.py
+ └── server.lua
+
+Step-by-Step Guide
+------------------
+
+Step 1: Create Tool Directory
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Create a new directory in ``fle/env/tools/agent/``:
+
+.. code-block:: bash
+
+ mkdir fle/env/tools/agent/my_tool
+
+Step 2: Create client.py
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Create ``client.py`` with a class inheriting from ``Tool``:
+
+.. code-block:: python
+
+ from typing import Optional
+ from fle.env.tools.tool import Tool
+ from fle.env.entities import Entity
+ from fle.env.models import Position
+
+ class MyTool(Tool):
+ """
+ Brief description of what your tool does.
+ """
+
+ def __call__(self,
+ entity: Entity,
+ target_position: Position,
+ quantity: Optional[int] = None) -> dict:
+ """
+ Detailed description of the tool's functionality.
+
+ Args:
+ entity: The entity to operate on
+ target_position: Where to perform the action
+ quantity: Optional quantity parameter
+
+ Returns:
+ Dictionary containing result information
+
+ Raises:
+ InvalidParameterException: If parameters are invalid
+ EntityNotFoundException: If entity doesn't exist
+ """
+ # Call server-side implementation
+ result = self.execute(
+ entity=entity.name,
+ position=target_position.to_dict(),
+ quantity=quantity
+ )
+
+ return result
+
+**Key Requirements:**
+
+- Inherit from ``Tool``
+- Implement ``__call__`` method
+- Use type annotations
+- Call ``self.execute()`` to invoke server-side logic
+- Document parameters, return values, and exceptions
+
+Step 3: Create server.lua
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Create ``server.lua`` with the game logic:
+
+.. code-block:: lua
+
+ -- Register the tool action
+ global.actions.my_tool = function(params)
+ -- Extract parameters
+ local entity_name = params.entity
+ local position = params.position
+ local quantity = params.quantity or 1
+
+ -- Validate parameters
+ if not entity_name or not position then
+ return {
+ success = false,
+ error = "Missing required parameters"
+ }
+ end
+
+ -- Find the entity
+ local entity = game.surfaces[1].find_entity(entity_name, position)
+ if not entity then
+ return {
+ success = false,
+ error = "Entity not found at position"
+ }
+ end
+
+ -- Perform the action using Factorio API
+ local result = entity.some_action(quantity)
+
+ -- Return serialized result
+ return {
+ success = true,
+ entity = serialize_entity(entity),
+ result = result
+ }
+ end
+
+**Key Requirements:**
+
+- Register function in ``global.actions``
+- Validate all parameters
+- Use `Factorio API `_
+- Return a serializable table
+- Include error handling
+
+Step 4: Create agent.md
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+Create ``agent.md`` with agent-facing documentation:
+
+.. code-block:: markdown
+
+ # My Tool
+
+ ## Description
+
+ Brief description of what the tool does and when to use it.
+
+ ## Usage
+
+ ```python
+ result = my_tool(
+ entity=my_entity,
+ target_position=Position(x=10, y=20),
+ quantity=5
+ )
+ ```
+
+ ## Parameters
+
+ - `entity` (Entity): The entity to operate on
+ - `target_position` (Position): Where to perform the action
+ - `quantity` (int, optional): How many items to process. Defaults to 1.
+
+ ## Returns
+
+ Dictionary containing:
+ - `success` (bool): Whether the operation succeeded
+ - `entity` (Entity): Updated entity object
+ - `result`: Operation-specific result data
+
+ ## Best Practices
+
+ 1. Always check entity status before calling
+ 2. Use reasonable quantity values
+ 3. Verify results with assertions
+
+ ## Common Pitfalls
+
+ - Entity must exist at the specified position
+ - Target position must be valid
+ - Quantity cannot exceed inventory limits
+
+ ## Examples
+
+ ### Basic Usage
+
+ ```python
+ entity = get_entity(Prototype.Chest, Position(x=0, y=0))
+ result = my_tool(entity, Position(x=5, y=5), quantity=10)
+ assert result['success']
+ ```
+
+ ### Error Handling
+
+ ```python
+ try:
+ result = my_tool(entity, position)
+ except InvalidParameterException as e:
+ print(f"Invalid parameters: {e}")
+ ```
+
+Step 5: Test Your Tool
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Create a test in ``fle/env/tests/actions/``:
+
+.. code-block:: python
+
+ import pytest
+ from fle.env.gym_env import FactorioGymEnv
+ from fle.env.models import Position
+
+ def test_my_tool():
+ env = FactorioGymEnv()
+ obs = env.reset()
+
+ # Setup test scenario
+ code = """
+ entity = place_entity(
+ Prototype.Chest,
+ Position(x=0, y=0),
+ Direction.NORTH
+ )
+
+ # Test your tool
+ result = my_tool(
+ entity=entity,
+ target_position=Position(x=5, y=5),
+ quantity=10
+ )
+
+ print(result)
+ assert result['success']
+ """
+
+ action = Action(agent_idx=0, code=code)
+ obs, reward, done, truncated, info = env.step(action)
+
+ # Verify results
+ assert "success" in obs['raw_text']
+ env.close()
+
+Complete Example
+----------------
+
+Here's a complete example of a tool that transfers items between two chests:
+
+**client.py:**
+
+.. code-block:: python
+
+ from typing import Optional
+ from fle.env.tools.tool import Tool
+ from fle.env.entities import Entity
+
+ class TransferItems(Tool):
+ """Transfers items between two entities."""
+
+ def __call__(self,
+ source: Entity,
+ destination: Entity,
+ item: str,
+ quantity: int) -> dict:
+ """
+ Transfer items from source to destination.
+
+ Args:
+ source: Entity to take items from
+ destination: Entity to place items into
+ item: Item prototype name
+ quantity: Number of items to transfer
+
+ Returns:
+ Dictionary with transfer results
+
+ Raises:
+ InsufficientItemsException: Not enough items in source
+ InventoryFullException: Destination inventory is full
+ """
+ result = self.execute(
+ source=source.name,
+ source_position=source.position.to_dict(),
+ destination=destination.name,
+ destination_position=destination.position.to_dict(),
+ item=item,
+ quantity=quantity
+ )
+
+ return result
+
+**server.lua:**
+
+.. code-block:: lua
+
+ global.actions.transfer_items = function(params)
+ local source = game.surfaces[1].find_entity(
+ params.source,
+ params.source_position
+ )
+ local destination = game.surfaces[1].find_entity(
+ params.destination,
+ params.destination_position
+ )
+
+ if not source or not destination then
+ return {success = false, error = "Entity not found"}
+ end
+
+ -- Get source inventory
+ local source_inv = source.get_inventory(defines.inventory.chest)
+ if not source_inv then
+ return {success = false, error = "No source inventory"}
+ end
+
+ -- Check if enough items
+ local available = source_inv.get_item_count(params.item)
+ if available < params.quantity then
+ return {
+ success = false,
+ error = "Insufficient items",
+ available = available
+ }
+ end
+
+ -- Transfer items
+ local removed = source_inv.remove({
+ name = params.item,
+ count = params.quantity
+ })
+
+ local dest_inv = destination.get_inventory(defines.inventory.chest)
+ local inserted = dest_inv.insert({
+ name = params.item,
+ count = removed
+ })
+
+ -- Return any excess
+ if inserted < removed then
+ source_inv.insert({
+ name = params.item,
+ count = removed - inserted
+ })
+ end
+
+ return {
+ success = true,
+ transferred = inserted,
+ source = serialize_entity(source),
+ destination = serialize_entity(destination)
+ }
+ end
+
+**agent.md:**
+
+.. code-block:: markdown
+
+ # Transfer Items
+
+ Transfer items between two entities' inventories.
+
+ ## Usage
+
+ ```python
+ source_chest = get_entity(Prototype.IronChest, Position(x=0, y=0))
+ dest_chest = get_entity(Prototype.IronChest, Position(x=5, y=5))
+
+ result = transfer_items(
+ source=source_chest,
+ destination=dest_chest,
+ item='iron-plate',
+ quantity=50
+ )
+ ```
+
+ ## Best Practices
+
+ 1. Check source has enough items before transferring
+ 2. Verify destination has space
+ 3. Handle partial transfers gracefully
+
+Automatic Registration
+----------------------
+
+Once your tool is created, it will be automatically:
+
+1. Discovered by the environment
+2. Available to agents in the Python namespace
+3. Documented in agent context with the ``agent.md`` content
+
+No additional registration steps are needed!
+
+Tips & Best Practices
+----------------------
+
+1. **Keep It Simple**: Tools should do one thing well
+2. **Validate Early**: Check parameters in both client and server
+3. **Document Thoroughly**: Agents rely on good documentation
+4. **Handle Errors**: Provide clear error messages
+5. **Test Extensively**: Create comprehensive test cases
+6. **Use Type Hints**: Make the interface clear with Python type annotations
+7. **Serialize Carefully**: Ensure all return values are JSON-serializable
+
+Common Patterns
+---------------
+
+Querying Entity State
+~~~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: lua
+
+ local entity = game.surfaces[1].find_entity(name, position)
+ return serialize_entity(entity)
+
+Modifying Inventory
+~~~~~~~~~~~~~~~~~~~
+
+.. code-block:: lua
+
+ local inventory = entity.get_inventory(defines.inventory.chest)
+ inventory.insert({name = item, count = quantity})
+
+Moving Entities
+~~~~~~~~~~~~~~~
+
+.. code-block:: lua
+
+ local success = entity.teleport(new_position)
+
+Checking Validity
+~~~~~~~~~~~~~~~~~
+
+.. code-block:: lua
+
+ if not entity.valid then
+ return {success = false, error = "Entity no longer exists"}
+ end
+
+Next Steps
+----------
+
+- Review :doc:`core_tools` for implementation patterns
+- See :doc:`overview` for architecture details
+- Check the `Factorio Lua API `_
+- Join the `Discord `_ for help
diff --git a/docs/sphinx/source/tools/overview.rst b/docs/sphinx/source/tools/overview.rst
new file mode 100644
index 000000000..235aa32db
--- /dev/null
+++ b/docs/sphinx/source/tools/overview.rst
@@ -0,0 +1,189 @@
+Tools Overview
+==============
+
+Agents interact with the game using *tools*, which represent a narrow API into the game. Tools are functions that agents can call to perform actions and retrieve information.
+
+What are Tools?
+---------------
+
+**Tools** are functions that:
+
+- Perform a game action (e.g., placing an entity, crafting an item)
+- Return a typed object (e.g., ``Entity``, ``Inventory``, ``Recipe``)
+- Can be stored as named variables in the Python namespace for later use
+
+Tools live in ``fle/env/tools/``, and are either:
+
+- **Admin tools**: Non-agent accessible, used for environment management
+- **Agent tools**: Used by agents to interact with the game
+
+Tool Architecture
+-----------------
+
+.. code-block:: text
+
+ ┌─────────────────┐
+ │ Agent │
+ │ (Synthesizes │
+ │ Python Code) │
+ └────────┬────────┘
+ │
+ ┌────────▼────────────────────┐
+ │ Learning Environment │
+ │ ┌────────────────────┐ │
+ │ │ Interpreter │ │
+ │ └─────────┬──────────┘ │
+ │ │ │
+ │ ┌─────────▼──────────┐ │
+ │ │ client.py │◄───┼─── Exceptions
+ │ │ (Python Interface)│ │
+ │ └─────────┬──────────┘ │
+ │ │ │
+ │ │ Objects │
+ └────────────┼─────────────────┘
+ │
+ │ Remote TCP Call
+ │
+ ┌────────────▼─────────────────┐
+ │ Factorio Server │
+ │ ┌─────────────────────┐ │
+ │ │ server.lua │ │
+ │ │ (Game Logic) │ │
+ │ └─────────┬───────────┘ │
+ │ │ │
+ │ ┌─────────▼───────────┐ │
+ │ │ Factorio Engine │ │
+ │ │ (Game Simulation) │ │
+ │ └─────────────────────┘ │
+ └──────────────────────────────┘
+
+Anatomy of a Tool
+-----------------
+
+A tool requires 3 files:
+
+1. **agent.md**: The agent documentation for the tool, including usage patterns, best practices, and failure modes
+2. **client.py**: The client-side implementation - a Python class that can be invoked by the agent
+3. **server.lua**: The server-side implementation - handles most of the logic and heavy lifting
+
+Tool Categories
+---------------
+
+Tools can be grouped into several categories:
+
+Inventory Management
+~~~~~~~~~~~~~~~~~~~~
+
+- ``inspect_inventory``: Check contents of player or entity inventories
+- ``insert_item``: Place items from player inventory into entities
+- ``extract_item``: Remove items from entity inventories
+
+Entity Manipulation
+~~~~~~~~~~~~~~~~~~~
+
+- ``place_entity``: Place entities in the world
+- ``place_entity_next_to``: Place entities relative to others
+- ``pickup_entity``: Remove entities from the world
+- ``rotate_entity``: Change entity orientation
+- ``get_entity``: Retrieve entity objects at positions
+- ``get_entities``: Find multiple entities in an area
+
+Resource Operations
+~~~~~~~~~~~~~~~~~~~
+
+- ``nearest``: Locate closest resources/entities
+- ``get_resource_patch``: Analyze resource deposits
+- ``harvest_resource``: Gather resources from the world
+
+Connections
+~~~~~~~~~~~
+
+- ``connect_entities``: Create connections between entities
+- ``get_connection_amount``: Calculate required connection items
+
+Crafting & Research
+~~~~~~~~~~~~~~~~~~~
+
+- ``craft_item``: Create items from components
+- ``get_prototype_recipe``: Retrieve crafting requirements
+- ``set_entity_recipe``: Configure machine crafting recipes
+- ``set_research``: Initiate technology research
+- ``get_research_progress``: Monitor research status
+
+Movement & Utility
+~~~~~~~~~~~~~~~~~~
+
+- ``move_to``: Move player to position
+- ``nearest_buildable``: Find valid building locations
+- ``sleep``: Pause execution
+- ``launch_rocket``: Control rocket silo launches
+
+Output
+~~~~~~
+
+- ``print``: Output debug information to stdout
+
+Using Tools
+-----------
+
+Tools are called like normal Python functions within agent code:
+
+.. code-block:: python
+
+ # Find nearest iron ore
+ iron_position = nearest(Resource.IronOre)
+
+ # Place a mining drill
+ drill = place_entity(
+ entity=Prototype.MiningDrill,
+ position=iron_position,
+ direction=Direction.NORTH
+ )
+
+ # Check the drill's status
+ print(f"Drill status: {drill.status}")
+
+ # Store result for later use
+ my_first_drill = drill
+
+Return Values
+-------------
+
+Tools return typed objects that can be:
+
+- **Inspected**: Access attributes like ``drill.status`` or ``inventory.items``
+- **Stored**: Save as variables for future reference
+- **Printed**: Display information to stdout for observation
+
+Common Return Types
+~~~~~~~~~~~~~~~~~~~
+
+- ``Entity``: Represents a game entity (drill, chest, inserter, etc.)
+- ``Inventory``: Contains items and quantities
+- ``Recipe``: Describes crafting requirements
+- ``Position``: X, Y coordinates
+- ``ResourcePatch``: Information about resource deposits
+
+Error Handling
+--------------
+
+Tools raise typed exceptions with detailed context when:
+
+- Invalid parameters are provided
+- Required resources are unavailable
+- Game constraints are violated (e.g., invalid placement)
+- Entities don't exist or have been destroyed
+
+Example error:
+
+.. code-block:: python
+
+ InvalidEntityPlacementException: Cannot place burner-mining-drill at
+ Position(x=10, y=20) - location is occupied by iron-chest
+
+Next Steps
+----------
+
+- See :doc:`core_tools` for detailed documentation on each tool
+- Learn how to :doc:`custom_tools` for specialized functionality
+- Review the :doc:`../environment/overview` to understand the full context
diff --git a/docs/versions/0.3.0.html b/docs/versions/0.3.0.html
index 138fd6257..0dfbaa585 100644
--- a/docs/versions/0.3.0.html
+++ b/docs/versions/0.3.0.html
@@ -1849,6 +1849,35 @@ Horizon
+
+