I am trying to use Push,Clojush,Clojure to implement an ant finding food in a 2d map, but I am not sure how to represent map? Could someone give me a example? Thank you.
Asked
Active
Viewed 119 times
-3
-
1[Go to the Clojush page at GitHub](https://github.com/lspector/Clojush) and read the QuickStart section. You'll need to have Clojure and Leiningen installed on your machine. Best of luck. – Bob Jarvis - Слава Україні Feb 06 '16 at 03:29
1 Answers
1
You have a whole implementation of an ant simulation in Clojure at https://github.com/juliangamble/clojure-ants-simulation
To your specific question, it uses a vector of vectors: https://github.com/juliangamble/clojure-ants-simulation/blob/master/src/ants.clj#L36

DanLebrero
- 8,545
- 1
- 29
- 30
-
Thanks, but the problem is that I want to use push, which is a "feature" in Clojure. And I do not know how to do it. – SwordW Feb 06 '16 at 00:15
-
@SwordW If you don't know how to do it with push, then either you don't understand it or you don't understand your problem, or you understand either, or you understand both and it's just not the right way to do it. – Cubic Feb 06 '16 at 12:03