Search found 2574 matches
- Jan 25, 2024 0:03
- Forum: Sources, Examples, Tips and Tricks
- Topic: Langton's ant
- Replies: 27
- Views: 1813
Re: Langton's ant
No aardvarks or anteaters yet, but you can now annoy the ants by pressing "r" to randomly relocated an nest entrance. 'https://www.freebasic.net/forum/viewtopic.php?p=301888#p301888 'An ant colony food finding simulation. 'Like here: https://onestepcode.com/ant-colony-simulation/ 'Where an...
- Jan 24, 2024 22:27
- Forum: Sources, Examples, Tips and Tricks
- Topic: ANT SIMULATIONS
- Replies: 3
- Views: 368
Re: ANT SIMULATIONS
Your random ant movement seems better (less nervous) than mine. I will try it as well, without the diagonal movement.
- Jan 23, 2024 0:00
- Forum: Sources, Examples, Tips and Tricks
- Topic: Langton's ant
- Replies: 27
- Views: 1813
Re: Langton's ant
Better now with fading paths. 'https://www.freebasic.net/forum/viewtopic.php?p=301888#p301888 'An ant colony food finding simulation. 'Like here: https://onestepcode.com/ant-colony-simulation/ 'Where ants: '- search for food locations - done '- find the way back to the nest with the food - done '- m...
- Jan 22, 2024 22:46
- Forum: Sources, Examples, Tips and Tricks
- Topic: Langton's ant
- Replies: 27
- Views: 1813
Re: Langton's ant
Further improved version. The food searching ants now detect the food trails, but they still get confused by old trails. I could use 'back tracking' to erase old paths completely, but that sounds to smart for ants. I'll try fading out of all trails over time as an alternative in the next version. Al...
- Jan 22, 2024 0:03
- Forum: Community Discussion
- Topic: Programming with Chatgpt
- Replies: 21
- Views: 4878
Re: Programming with Chatgpt
The funny this is, that if we get a fusion power plant working, it will likely depend on AI to work, to keep the plasma inside stable and hot enough.
- Jan 21, 2024 23:53
- Forum: Sources, Examples, Tips and Tricks
- Topic: Langton's ant
- Replies: 27
- Views: 1813
Re: Langton's ant
Final version for today. The food locations now run out. The random walkers don't pick up a food trail yet and those who do follow a trail, often go to depleted food location and get lost. Resulting in many random walkers. To be improved... 'https://www.freebasic.net/forum/viewtopic.php?p=301888#p30...
- Jan 21, 2024 22:14
- Forum: Sources, Examples, Tips and Tricks
- Topic: Langton's ant
- Replies: 27
- Views: 1813
Re: Langton's ant
Updated version (with more ants). The ants now create a path to the food. Visible by holding the "F" key. 'https://www.freebasic.net/forum/viewtopic.php?p=301888#p301888 'An ant colony food finding simulation. 'Like here: https://onestepcode.com/ant-colony-simulation/ 'Where ants: '- searc...
- Jan 21, 2024 21:46
- Forum: Sources, Examples, Tips and Tricks
- Topic: Langton's ant
- Replies: 27
- Views: 1813
Re: Langton's ant
@badidea It took about 20 minutes for all of the ants to find the food source. The last two ants could have used some help finding a food source. For a demo, I'm not sure if everyone is going to wait 20 or more minutes for it to finish. Is there any way you could speed it up? Then you had an extrem...
- Jan 21, 2024 19:14
- Forum: Sources, Examples, Tips and Tricks
- Topic: Langton's ant
- Replies: 27
- Views: 1813
Re: Langton's ant
Nest step implemented: Finding way back to nest with the food. Color of ant: red = food search , blue = food to nest , green = to food source (not yet implemented) The "N" key still works, to see the world as an ant. The random walk BTW, is amazingly inefficient for finding something. I ho...
- Jan 21, 2024 16:44
- Forum: Sources, Examples, Tips and Tricks
- Topic: Fish aquarium
- Replies: 18
- Views: 1252
- Jan 21, 2024 13:36
- Forum: Sources, Examples, Tips and Tricks
- Topic: Fish aquarium
- Replies: 18
- Views: 1252
Re: Fish aquarium
@badidea I tried your DrawFish. How could the code be changed so the fish can't swim backwards? ' fish aquarium by neil ' fish graphics by badidea ScreenRes 800,600,32,1 Randomize Setmouse 0,0,0 Const W As Integer = 800 Const H As Integer = 600 Type Fish X As Integer Y As Integer DX As Integer DY A...
- Jan 21, 2024 1:28
- Forum: Sources, Examples, Tips and Tricks
- Topic: Langton's ant
- Replies: 27
- Views: 1813
Re: Langton's ant
Nice artwork, the agents look like bears. My ants however, will not use A*, they will use the Ant* algoritm.
- Jan 21, 2024 0:38
- Forum: Sources, Examples, Tips and Tricks
- Topic: Fish aquarium
- Replies: 18
- Views: 1252
Re: Fish aquarium
Try this for DrawFish: Sub DrawFish() Screenlock Cls For i As Integer = 1 To NumFish 'CirCle(Fsh(i).X, Fsh(i).Y), 10,Fsh(i).C CirCle(Fsh(i).X, Fsh(i).Y + 5), 12, Fsh(i).C, 3.1416 * 0.15, 3.1416 * 0.85 CirCle(Fsh(i).X, Fsh(i).Y - 5), 12, Fsh(i).C, 3.1416 * 1.15, 3.1416 * 1.85 line(Fsh(i).X - 10, Fsh(...
- Jan 20, 2024 23:38
- Forum: Sources, Examples, Tips and Tricks
- Topic: Langton's ant
- Replies: 27
- Views: 1813
Re: Langton's ant
Some progress. Ants now start at nest location and if the "N" key is being pressed the 'nest heat map' or 'distance to map' is shown. 'https://www.freebasic.net/forum/viewtopic.php?p=301888#p301888 'An ant colony food finding simulation. 'Like here: https://onestepcode.com/ant-colony-simul...
- Jan 19, 2024 19:51
- Forum: Sources, Examples, Tips and Tricks
- Topic: Langton's ant
- Replies: 27
- Views: 1813
Re: Langton's ant
I posted a path search in 2016 using Dijkstra's algorithm, see: https://www.freebasic.net/forum/viewtopic.php?t=24542 I will give the ant idea a try. Might take some time... The easy part is done, find food (yellow cell) by random walk. 'An ant colony food finding simulation. 'Where ants: '- search ...