![]() |
Reinforcement Learning and
Artificial
Intelligence (RLAI) |
tiny-crystal project part 3: connection and path primitives in lookup |
connect
and connect-from
. Implement these as scheme procedures that are called from the lookup
procedure you wrote in part 2. Brief descriptions of the
functions of these basic crystal names can be found on pages 2 and 3 of the
crystal vocabulary notes, but remember that here in tiny crystal we are
using their fixed-length forms, as in:(connect '(a b c) 7)
(connect-from (x y) '(a b c) 7)
push-path
and pop-path
.connect
s to connect-from
s to that you only need to implement one of them.#|
testing
(driver-loop)
(connect '(x) 5)
(connect '(y) 7)
(x)
(connect '(ship) (new))
(push-path (ship))
(connect '(x) 12)
(connect '(y) 13)
()
(ship)
(pop-path)
()
|#
Changes since Nov 15:
In class Jeremy suggested that these crystal primitives could be treated just like the other scheme primitives, like + or display
. That would be a very clean way to implement this, if it is possible.