@simontiger/

Raytracing A.I. Full

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • toy_nn
  • boundary.js
  • car.js
  • ga.js
  • path.js
  • ray.js
  • sketch.js
  • style.css
  • trace_ai.js

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.2648635678023217","path":"index.html","file":{"path":"index.html","content":{"asEncoding":{"base64":"PCFET0NUWVBFIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPG1ldGEgY2hhcnNldD0idXRmLTgiPgogICAgPG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCI+CiAgICA8dGl0bGU+cmVwbC5pdDwvdGl0bGU+CiAgICA8bGluayBocmVmPSJzdHlsZS5jc3MiIHJlbD0ic3R5bGVzaGVldCIgdHlwZT0idGV4dC9jc3MiIC8+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvcDUuanMvMC44LjAvcDUubWluLmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9wNS5qcy8wLjguMC9hZGRvbnMvcDUuZG9tLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0idG95X25uL21hdHJpeC5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0idG95X25uL25uLmpzIj48L3NjcmlwdD4KICA8L2hlYWQ+CiAgPGJvZHk+CiAgICA8aDE+UmF5dHJhY2luZyBBLkkuPC9oMT4KICAgIDxkaXYgaWQ9Im5hdmJhciI+CiAgICAgIDxhIGlkPSJjdXJyZW50Ij5PcmlnaW5hbDwvYT4KICAgICAgPGE+SW1wcm92ZWQ8L2E+CiAgICAgIDxhPk1vcmUgSW1wcm92ZWQ8L2E+CiAgICA8L2Rpdj4KICAgIDxwPgogICAg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4KICAgIDxzY3JpcHQgc3JjPSJnYS5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0ic2tldGNoLmpzIj48L3NjcmlwdD4KICA8L2JvZHk+CjwvaHRtbD4="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>repl.it</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/p5.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/addons/p5.dom.min.js"></script>
    <script src="toy_nn/matrix.js"></script>
    <script src="toy_nn/nn.js"></script>
  </head>
  <body>
    <h1>Raytracing A.I.</h1>
    <div id="navbar">
      <a id="current">Original</a>
      <a>Improved</a>
      <a>More Improved</a>
    </div>
    <p>
      This is an AI where cars try to go as far as they can on a road,
      while avoiding the walls of the road.
    </p>
    <p id="path">
      Click on the dark-grey area to make the road.
      <button id="finish">Finish Path</button>
    </p>
    <p id="params" style="display: none">
      Path-making method:
      <select>
        <option>Keep the same path for every generation.</option>
        <option>Generate a new path for every generation.</option>
        <option>Interactively make a new path for every generation.</option>
      </select>
      <br/>
      <button id="start">Start Simulation</button>
    </p>
    <script src="boundary.js"></script>
    <script src="ray.js"></script>
    <script src="path.js"></script>
    <script src="car.js"></script>
    <script src="trace_ai.js"></script>
    <script src="ga.js"></script>
    <script src="sketch.js"></script>
  </body>
</html>
result
console