<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nicolas Gonzalez</title>
    <description>The latest articles on DEV Community by Nicolas Gonzalez (@nsgonzalez).</description>
    <link>https://dev.to/nsgonzalez</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F152102%2F44b73ab8-a820-44c7-8d50-c2423dfcf855.jpeg</url>
      <title>DEV Community: Nicolas Gonzalez</title>
      <link>https://dev.to/nsgonzalez</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nsgonzalez"/>
    <language>en</language>
    <item>
      <title>mod_cluster Management Script</title>
      <dc:creator>Nicolas Gonzalez</dc:creator>
      <pubDate>Tue, 07 May 2019 14:06:50 +0000</pubDate>
      <link>https://dev.to/nsgonzalez/modcluster-management-script-444i</link>
      <guid>https://dev.to/nsgonzalez/modcluster-management-script-444i</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/nsgonzalez/mms"&gt;https://github.com/nsgonzalez/mms&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  mod_cluster Management Script
&lt;/h1&gt;

&lt;p&gt;mms is a shell script that allows you to execute some of the functions available on Apache's mod_cluster-manager (web).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;List all available nodes&lt;/li&gt;
&lt;li&gt;Enable, Disable and Stop a Context&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Usage
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x mms.sh
&lt;span class="nv"&gt;$ &lt;/span&gt;./mms.sh &lt;span class="nt"&gt;--help&lt;/span&gt;

 ███╗   ███╗███╗   ███╗███████╗
 ████╗ ████║████╗ ████║██╔════╝
 ██╔████╔██║██╔████╔██║███████╗
 ██║╚██╔╝██║██║╚██╔╝██║╚════██║
 ██║ ╚═╝ ██║██║ ╚═╝ ██║███████║
 ╚═╝     ╚═╝╚═╝     ╚═╝╚══════╝

&lt;span class="o"&gt;===============================&lt;/span&gt;
 MOD_CLUSTER MANAGEMENT SCRIPT
&lt;span class="o"&gt;===============================&lt;/span&gt;

usage:  ./mms.sh &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;-h&lt;/span&gt;|--host &amp;lt;ip address&amp;gt;] &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;-p&lt;/span&gt;|--port &amp;lt;port&amp;gt;] &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;-s&lt;/span&gt;|--show-nodes]
        ./mms.sh &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;-h&lt;/span&gt;|--host &amp;lt;ip address&amp;gt;] &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;-p&lt;/span&gt;|--port &amp;lt;port&amp;gt;] &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;-n&lt;/span&gt;|--node &amp;lt;node&amp;gt;] &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;--context-stop&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; | &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;--context-disable&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; | &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;--context-enable&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&amp;lt;Node ID&amp;gt; &amp;lt;Context&amp;gt;]

where:
    &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;-h&lt;/span&gt;|--host&lt;span class="o"&gt;)&lt;/span&gt;         &lt;span class="nb"&gt;set &lt;/span&gt;the apache mcm host
    &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;-p&lt;/span&gt;|--port&lt;span class="o"&gt;)&lt;/span&gt;         &lt;span class="nb"&gt;set &lt;/span&gt;the apache mcm port
    &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;-n&lt;/span&gt;|--node&lt;span class="o"&gt;)&lt;/span&gt;         &lt;span class="nb"&gt;set &lt;/span&gt;the apache mcm node
    &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;-s&lt;/span&gt;|--show-nodes&lt;span class="o"&gt;)&lt;/span&gt;       list all the nodes
    &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--context-enable&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;      &lt;span class="nb"&gt;enable &lt;/span&gt;a context
    &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--context-disable&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;     disable a context
    &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--context-stop&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;        stop a context

    &lt;span class="nt"&gt;--help&lt;/span&gt;          show this &lt;span class="nb"&gt;help &lt;/span&gt;text
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  Examples
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;List all the nodes&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;    ./mms.sh &lt;span class="nt"&gt;--host&lt;/span&gt; 192.168.4.12 &lt;span class="nt"&gt;--show-nodes&lt;/span&gt;

    Nodes:

    1&lt;span class="o"&gt;)&lt;/span&gt; wf411 &lt;span class="o"&gt;(&lt;/span&gt;ajp://192.168.4.11:8009&lt;span class="o"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /TestApp-war        &lt;span class="o"&gt;[&lt;/span&gt;ENABLED]
      &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /   &lt;span class="o"&gt;[&lt;/span&gt;ENABLED]
      &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /wildfly-services   &lt;span class="o"&gt;[&lt;/span&gt;ENABLED]

    2&lt;span class="o"&gt;)&lt;/span&gt; wf410 &lt;span class="o"&gt;(&lt;/span&gt;ajp://192.168.4.10:8009&lt;span class="o"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /TestApp-war        &lt;span class="o"&gt;[&lt;/span&gt;ENABLED]
      &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /   &lt;span class="o"&gt;[&lt;/span&gt;ENABLED]
      &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /wildfly-services   &lt;span class="o"&gt;[&lt;/span&gt;ENABLED]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Stop a context&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;    ./mms.sh &lt;span class="nt"&gt;--host&lt;/span&gt; 192.168.4.12 &lt;span class="nt"&gt;--node&lt;/span&gt; 2 &lt;span class="nt"&gt;--context-stop&lt;/span&gt; TestApp-war

    Stopping:

    2&lt;span class="o"&gt;)&lt;/span&gt; wf410 &lt;span class="o"&gt;(&lt;/span&gt;ajp://192.168.4.10:8009&lt;span class="o"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /TestApp-war        &lt;span class="o"&gt;[&lt;/span&gt;ENABLED]

    Disabling from: http://192.168.4.10:5555/mcm?nonce&lt;span class="o"&gt;=&lt;/span&gt;e87c92bd-195e-4845-91cd-2a192f14a553&amp;amp;Cmd&lt;span class="o"&gt;=&lt;/span&gt;DISABLE-APP&amp;amp;Range&lt;span class="o"&gt;=&lt;/span&gt;CONTEXT&amp;amp;JVMRoute&lt;span class="o"&gt;=&lt;/span&gt;wf410&amp;amp;Alias&lt;span class="o"&gt;=&lt;/span&gt;default-host&amp;amp;Context&lt;span class="o"&gt;=&lt;/span&gt;/TestApp-war

    Nodes:

    1&lt;span class="o"&gt;)&lt;/span&gt; wf411 &lt;span class="o"&gt;(&lt;/span&gt;ajp://192.168.4.11:8009&lt;span class="o"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /TestApp-war        &lt;span class="o"&gt;[&lt;/span&gt;ENABLED]
      &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /   &lt;span class="o"&gt;[&lt;/span&gt;ENABLED]
      &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /wildfly-services   &lt;span class="o"&gt;[&lt;/span&gt;ENABLED]

    2&lt;span class="o"&gt;)&lt;/span&gt; wf410 &lt;span class="o"&gt;(&lt;/span&gt;ajp://192.168.4.10:8009&lt;span class="o"&gt;)&lt;/span&gt;
      &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /TestApp-war        &lt;span class="o"&gt;[&lt;/span&gt;STOPPED]
      &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /   &lt;span class="o"&gt;[&lt;/span&gt;ENABLED]
      &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /wildfly-services   &lt;span class="o"&gt;[&lt;/span&gt;ENABLED]

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>modcluster</category>
      <category>apache</category>
      <category>shell</category>
      <category>script</category>
    </item>
    <item>
      <title>ProGo Bird</title>
      <dc:creator>Nicolas Gonzalez</dc:creator>
      <pubDate>Tue, 02 Apr 2019 22:23:55 +0000</pubDate>
      <link>https://dev.to/nsgonzalez/progo-bird-5h72</link>
      <guid>https://dev.to/nsgonzalez/progo-bird-5h72</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/nsgonzalez/progo-bird" rel="noopener noreferrer"&gt;https://github.com/nsgonzalez/progo-bird&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ProGo Bird is a simple Agent written in Prolog that plans a game for a custom and basic version of Flappy Bird where the bird has to reach a goal. It's pretty basic and it does not calculate what action it should do online, instead it does all the calculation before the game start (calling swipl through python), then store the actions to execute in a slice and pops them until the game is finished.&lt;/p&gt;

&lt;p&gt;The game is based on a modified version of &lt;strong&gt;Platform&lt;/strong&gt; under the Pixel's examples (&lt;a href="https://github.com/faiface/pixel-examples/tree/master/platformer" rel="noopener noreferrer"&gt;https://github.com/faiface/pixel-examples/tree/master/platformer&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Requisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;debian packages

&lt;ul&gt;
&lt;li&gt;git&lt;/li&gt;
&lt;li&gt;golang&lt;/li&gt;
&lt;li&gt;swi-prolog&lt;/li&gt;
&lt;li&gt;python3-pip&lt;/li&gt;
&lt;li&gt;libgl1-mesa-dev&lt;/li&gt;
&lt;li&gt;libxcursor-dev&lt;/li&gt;
&lt;li&gt;libxrandr-dev&lt;/li&gt;
&lt;li&gt;libxinerama-dev&lt;/li&gt;
&lt;li&gt;libxi-dev&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;pip packages

&lt;ul&gt;
&lt;li&gt;pyswip (refactor branch)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;OpenGL &amp;gt;= 3.0&lt;/li&gt;

&lt;/ul&gt;

&lt;h6&gt;
  
  
  Note: it only was tested under Debian 9.4 x86, Ubuntu 18.04.1 x64 and Deepin 15.9.2 x64
&lt;/h6&gt;

&lt;h5&gt;
  
  
  Install dependencies
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; git golang swi-prolog python3-pip libgl1-mesa-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev
&lt;span class="nv"&gt;$ &lt;/span&gt;wget &lt;span class="nt"&gt;-O&lt;/span&gt; pyswip.zip https://github.com/yuce/pyswip/archive/refactor.zip
&lt;span class="nv"&gt;$ &lt;/span&gt;unzip pyswip.zip
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;pyswip-refactor
&lt;span class="nv"&gt;$ &lt;/span&gt;python3 setup.py &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--user&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;When the game sarts the bird is at (0, 0) and we need it to arrive to a goal located at (X, Y) with a radius R. The speed of the loop in which the game runs is 60fps, so in order to make it work it is multiplied by a factor, which is passed to the agent program so it calculates which moves it should make according to that factor starting from the point (0, 0). Then, the result of the multiplication give us the fps at which the agent performs an action. For example, if the factor would be 0.5, then the result would be 30 and the agent would calculate which actions it should perform every 30fps (0.5 seconds approximately).&lt;/p&gt;

&lt;p&gt;I could't find or get successful results with any go library implementing a prolog interpreter, so before the game's loop starts a few calls to a python script implementing pyswip (swipl library for python) is made through a tcp socket and reading back the actions it should perform to play a successful game.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run
&lt;/h2&gt;

&lt;p&gt;Clone the repository, install the go dependencies and run the program.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git clone https://github.com/nsgonzalez/progo-bird.git
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;progo-bird
&lt;span class="nv"&gt;$ &lt;/span&gt;go get ./...
&lt;span class="nv"&gt;$ &lt;/span&gt;go run &lt;span class="k"&gt;*&lt;/span&gt;.go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk0byzrrip2rtsumy30of.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk0byzrrip2rtsumy30of.gif" width="200" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Successful games
&lt;/h4&gt;

&lt;p&gt;The games that proved to be successful under this weird implementation are the following, and all of them require to modify  &lt;strong&gt;parameters.go&lt;/strong&gt; as follows. &lt;/p&gt;

&lt;h5&gt;
  
  
  Game 1 - 30fps
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;TIME_AGENT_FACTOR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0.5&lt;/span&gt;
&lt;span class="n"&gt;START_AGENT_FACTOR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt;
&lt;span class="n"&gt;PLATFORM_MARGIN_H&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;18&lt;/span&gt;
&lt;span class="n"&gt;PLATFORM_MARGIN_V&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;span class="n"&gt;PLATFORM_TB_MARGIN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Game 2 - 24fps
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;TIME_AGENT_FACTOR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0.40&lt;/span&gt;
&lt;span class="n"&gt;START_AGENT_FACTOR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt;
&lt;span class="n"&gt;PLATFORM_MARGIN_H&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;
&lt;span class="n"&gt;PLATFORM_MARGIN_V&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;span class="n"&gt;PLATFORM_TB_MARGIN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Game 3 - 18fps
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;TIME_AGENT_FACTOR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0.30&lt;/span&gt;
&lt;span class="n"&gt;START_AGENT_FACTOR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;
&lt;span class="n"&gt;PLATFORM_MARGIN_H&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;
&lt;span class="n"&gt;PLATFORM_MARGIN_V&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;span class="n"&gt;PLATFORM_TB_MARGIN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Game 4 - 15fps
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;TIME_AGENT_FACTOR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0.25&lt;/span&gt;
&lt;span class="n"&gt;START_AGENT_FACTOR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt;
&lt;span class="n"&gt;PLATFORM_MARGIN_H&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;
&lt;span class="n"&gt;PLATFORM_MARGIN_V&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;
&lt;span class="n"&gt;PLATFORM_TB_MARGIN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Game 5 - 12fps
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;TIME_AGENT_FACTOR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0.20&lt;/span&gt;
&lt;span class="n"&gt;START_AGENT_FACTOR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;7&lt;/span&gt;
&lt;span class="n"&gt;PLATFORM_MARGIN_H&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;span class="n"&gt;PLATFORM_MARGIN_V&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;
&lt;span class="n"&gt;PLATFORM_TB_MARGIN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just a little explanation about the variables (constants really):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TIME_AGENT_FACTOR&lt;/strong&gt; is the factor that indicates how time is discretized.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;START_AGENT_FACTOR&lt;/strong&gt; is multiplied with &lt;strong&gt;TIME_AGENT_FACTOR&lt;/strong&gt; to simulate the fall when game starts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PLATFORM_MARGIN_H&lt;/strong&gt; AND &lt;strong&gt;PLATFORM_MARGIN_V&lt;/strong&gt; are horizontal and vertical margins for the platforms, so the agent doesn't calculate the moves too close to them. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PLATFORM_TB_MARGIN&lt;/strong&gt; same as above but for the top and bottom platforms.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>game</category>
      <category>prolog</category>
      <category>planning</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
