Skip to content

Commit

Permalink
Fixed bug in UMAD deletion and False literals
Browse files Browse the repository at this point in the history
  • Loading branch information
thelmuth committed Jul 14, 2021
1 parent 685b991 commit bde4963
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 28,5 @@ clojush.iml
.lein-project-checksum
scratch.clj
.calva/
.clj-kondo/
.lsp
5 changes: 2 additions & 3 deletions src/clojush/pushgp/genetic_operators.clj
Original file line number Diff line number Diff line change
Expand Up @@ -623,9 623,8 @@ given by uniform-deletion-rate.
atom-generators argmap)])
[%])
(:genome ind))))
new-genome (vec (filter identity
(mapv #(if (< (lrand) deletion-rate) nil %)
after-addition)))]
new-genome (vec (remove (fn [_] (< (lrand) deletion-rate))
after-addition))]
(make-individual :genome new-genome
:history (:history ind)
:grain-size (compute-grain-size new-genome ind argmap)
Expand Down

0 comments on commit bde4963

Please sign in to comment.