# Nature of code - Autonomous agents exercise 6.2

**URL:** https://discourse.processing.org/t/nature-of-code-autonomous-agents-exercise-6-2/42233
**Category:** Coding Questions
**Created:** [June 17, 2023, 9:43am UTC](https://discourse.processing.org/t/nature-of-code-autonomous-agents-exercise-6-2/42233 "2023-06-17T09:43:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![alex119](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@alex119](https://discourse.processing.org/u/alex119)
#### Post date: [June 17, 2023, 9:43am UTC](https://discourse.processing.org/t/nature-of-code-autonomous-agents-exercise-6-2/42233/1 "2023-06-17T09:43:49Z")

</div>

Hello,

I am trying to do the exercise 6.2 from The Nature of Code Autonomous Agents chapter.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/f/1/f1fc8beb4a48333f2a419d734160e8b72c6ad52c.png)

I did something like this but is not working:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/1/e19c84f4f4282d27876e2102b4fcb5dee0e45c5b.png)

I looked on the github repository for this exercise, but it doesn’t seem to do what the exercise says.

Is anybody that did this exercise ? and if yes, can you give me some tips please ?  
If you need the full source code, please let me know.

Thank you!
