Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions evolver.amlg
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
(assign_to_entities "_population_manifest" (assoc metadata
(map
(lambda
(set (current_value) "age"
(modify (current_value) "age"
(+ 1 (get (current_value) "age"))))
(retrieve_from_entity "_population_manifest" "metadata")
)
Expand All @@ -152,7 +152,7 @@
;update score
(assign (assoc
metadata
(set metadata (list id "score")
(modify metadata (list id "score")

;if don't have an existing score, use the current one
(if (= prev_score .null)
Expand All @@ -170,7 +170,7 @@

;initialize record for this entity
(assign (assoc
metadata (set metadata
metadata (modify metadata
id
(assoc
score score
Expand Down
4 changes: 2 additions & 2 deletions tic_tac_toe.amlg
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
(<= 0 column 2)
(= (get board [row column]) 0)
)
(set board
(modify board
row
(set (get board row) column player)
(modify (get board row) column player)
)

;else return the board as it is
Expand Down
Loading