title: How should I write this rule in CLIPS?
body: <p>Please, help me create the rules in CLIPS to resolve this tasks:</p>
  <ol>
  <li>The goalkeeper has to move on the goal post line in that position where it can block the trajectory of the ball.</li>
  <li>The defenders have to move so that to block the ball in its trajectory towards goal or to block the trajectory of an opponent player that moves towards the goal post that must be defended.</li>
  </ol>
  <pre><code>(deftemplate temp
  (players &lt;number_robots&gt;)
  (Goal_posts &lt;number_goal_posts&gt;)
  (Field &lt;dimension&gt;)
  (players goalkeeper &lt;number_goalkeepers&gt; &lt;goalkeeper_linear_speed&gt; &lt;goalkeeper_angular_speed&gt; {static, running})
  (players defenders &lt;number_defenders&gt; &lt;defender_linear_speed&gt; &lt;defender_angular_speed&gt; {static, running})
  (players midfielder &lt;number_midfielders&gt; &lt;midfielder_linear_speed&gt; &lt;midfielder_angular_speed&gt; {static, running})
  (players striker &lt;number_strikers&gt; &lt;striker_linear_speed&gt; &lt;striker_angular_speed&gt; {static, running})
  (ball &lt;poz_x&gt; &lt;poz_y)
  (oponents &lt;nume&gt; &lt;poz_oponents_x&gt; &lt;poz_oponents_y&gt;))
  
  (deffacts initial-state
      (player goalkeeper 1 10 6 static)
      (player defenders number_defenders 15 10 running)
      (player midfielders number_midfielders 17 12 running)
      (player strikers number_strikers 9 10 running)
      (ball 5 5)
      (oponents Robot1 1 2)
      (oponents Robot2 2 4)
      (oponents Robot3 7 2)
      (oponents Robot4 10 20)
      (oponents Robot5 11 8)
      (oponents Robot6 20 10)
      (oponents Robot7 5 9)
  )
  </code></pre>