Search found 2569 matches
- Jan 21, 2024 23:53
- Forum: Sources, Examples, Tips and Tricks
- Topic: Langton's ant
- Replies: 27
- Views: 1755
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: 1755
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: 1755
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: 1755
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: 1218
- Jan 21, 2024 13:36
- Forum: Sources, Examples, Tips and Tricks
- Topic: Fish aquarium
- Replies: 18
- Views: 1218
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: 1755
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: 1218
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: 1755
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: 1755
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 ...
- Jan 19, 2024 13:15
- Forum: Sources, Examples, Tips and Tricks
- Topic: Langton's ant
- Replies: 27
- Views: 1755
Re: Langton's ant
More interesting, I think, is a ant colony food finding simulation. Where ants search for food locations, find the way back to the nest with the food, mark a path to the food for others, optimize the path, switch to different location when the food runs out. Like here: https://onestepcode.com/ant-co...
- Jan 19, 2024 0:10
- Forum: Sources, Examples, Tips and Tricks
- Topic: Langton's ant
- Replies: 27
- Views: 1755
Re: Langton's ant
And the normal ant on a looped around map with some extra colors: 'define colors const as ulong C_BLACK = &hff000000 const as ulong C_YELLOW = &hffffff00 const as ulong C_RED = &hffff0000 const as ulong C_GREEN = &hff00ff00 const as ulong C_BLUE = &hff0000ff dim as ulong drawColo...
- Jan 18, 2024 23:58
- Forum: Sources, Examples, Tips and Tricks
- Topic: Langton's ant
- Replies: 27
- Views: 1755
Re: Langton's ant
I made an ant that takes 45 degree turns. Keeps doing seemingly random walks. 'define colors const as ulong C_BLACK = &hff000000 const as ulong C_YELLOW = &hffffff00 const as ulong C_RED = &hffff0000 const as ulong C_GREEN = &hff00ff00 const as ulong C_BLUE = &hff0000ff dim as ul...
- Jan 14, 2024 23:17
- Forum: Sources, Examples, Tips and Tricks
- Topic: Conway's Game of Life
- Replies: 4
- Views: 400
Re: Conway's Game of Life
This one? ants tripod gait
That ant does not make turns.
bluatigro tried Langtons Loop
I don't see any tries at Langton's ant in freebasic yet.
- Nov 30, 2023 21:26
- Forum: Game Dev
- Topic: The world needs more tetris
- Replies: 6
- Views: 910