Com implementar l’Algorisme Boids en QBasic
- 40:18
- 76 visualitzacions
- 12 m'agrada
En aquest vídeo implementarem en QBasic un algorisme de vida artificial molt conegut. Es tracta de l'algorisme Boids desenvolupat per Craig Reynolds a l'any 1986. Aquest senzill algorisme recrea el comportament de bandada d'alguns animals com es el cas d'algunes espècies concretes d'aus, peixos i fins i tot d'alguns mamífers com les ovelles.
Codi font: https://github.com/albertnadal/QBasicBoids
00:00:04 Introducing the Reynold's Boids algorithm
00:03:23 Draw boids on the screen
00:05:54 The main loop
00:07:59 Apply noise forces to boids
00:09:19 Move boids on the screen
00:11:04 Limit the frames per second
00:12:02 Limit the speed of the boids
00:14:17 Draw boids like fishes
00:16:46 Get the neighbors of each boid
00:20:41 Calculate cohesion forces
00:24:48 Calculate alignment forces
00:27:08 Calculate separation forces
00:29:23 Refactor and improve performance
00:33:42 Draw obstacles and repulsion forces
00:38:13 Behind the scenes
#programming #computerscience #algorithm #boids #craigreynolds #tutorial #qbasic #msdos