Search found 3828 matches

by BasicCoder2
Apr 21, 2024 8:01
Forum: Community Discussion
Topic: free Basic - just curious?
Replies: 14
Views: 699

Re: free Basic - just curious?

@codeWrapped If wanting to write computer games is your goal you might want to consider what kind of games you want to write and on what platforms you want them to run when selecting a computer language. In the early years of FreeBASIC there were many games written but it has all but died out now. h...
by BasicCoder2
Apr 21, 2024 1:15
Forum: Community Discussion
Topic: free Basic - just curious?
Replies: 14
Views: 699

Re: free Basic - just curious?

BASIC was my first language on my first computer the TRS80. The attraction I had for FreeBASIC 12 years ago was as a hobby programmer. FreeBASIC was easier to use and read than the C++ I had been using up to then and compiled to fast readable code and also came with innate graphics statements releva...
by BasicCoder2
Mar 22, 2024 19:06
Forum: General
Topic: screenres with a vertical scroll bar
Replies: 16
Views: 903

Re: screenres with a vertical scroll bar

@jaskin
You are good to go then with the PlanetSquires Forums to help?
by BasicCoder2
Mar 22, 2024 6:26
Forum: General
Topic: screenres with a vertical scroll bar
Replies: 16
Views: 903

Re: screenres with a vertical scroll bar

@jaskin I rather go to the source and use Win32 API calls directly. It depends on what you are programming and why. I spent time learning to use the Win32 API using C++ but found no advantage over using Visual Basic (at the time) with its GUI editor. I have always rolled my own GUI since the DOS day...
by BasicCoder2
Mar 12, 2024 22:23
Forum: Sources, Examples, Tips and Tricks
Topic: The Travelling Salesman Problem
Replies: 21
Views: 1272

Re: The Travelling Salesman Problem

@dodicat I wondered how well you could figure out the shortest path by visual inspection. The human eye is very good at clustering. So I modified your code as I was too lazy to write my own version hope you don't mind. I added a function drawLine() so by clicking each point you could join them up wi...
by BasicCoder2
Mar 09, 2024 19:36
Forum: Sources, Examples, Tips and Tricks
Topic: The Travelling Salesman Problem
Replies: 21
Views: 1272

Re: The Travelling Salesman Problem

Both the circle and nearest town algorithms get pretty good results.
by BasicCoder2
Mar 09, 2024 17:28
Forum: Sources, Examples, Tips and Tricks
Topic: The Travelling Salesman Problem
Replies: 21
Views: 1272

Re: The Travelling Salesman Problem

@dodicat Many years ago (1984), my late wife and myself and our small dog took a long Summer break in our towing caravan. We ended up near London, and parked up in a site by the edge of Epping forest. My wife got a temporary job, at her trade as bookkeeper, in Woodford Green, I took a job as a milkm...
by BasicCoder2
Mar 09, 2024 0:03
Forum: Sources, Examples, Tips and Tricks
Topic: The Travelling Salesman Problem
Replies: 21
Views: 1272

Re: The Travelling Salesman Problem

I have modified Lothar Schirm's code to having a fixed number of towns and when the program is exited the town locations are saved as data statements in townsData.bas to be copied pasted into another version which reads the locations rather than making a new random selection. This data set can be us...
by BasicCoder2
Mar 08, 2024 17:05
Forum: Sources, Examples, Tips and Tricks
Topic: The Travelling Salesman Problem
Replies: 21
Views: 1272

Re: The Travelling Salesman Problem

Lothar Schirm A brute force approach rapidly becomes unsuitable as the number of cities increases. I was just curious what the current AI would generate. I asked for a fast good enough solution for the traveling salesman problem and it comes up with your nearest neighbor solution. I added the graphi...
by BasicCoder2
Mar 08, 2024 6:52
Forum: Sources, Examples, Tips and Tricks
Topic: The Travelling Salesman Problem
Replies: 21
Views: 1272

Re: The Travelling Salesman Problem

Just for fun I asked AI to generate a solution. I had to modify the solution to make it work and add graphics to display the city layouts. 'MODIFIED CODE GENERATED BY https://deepai.org/chat 'This code generates random cities with x and y coordinates, computes the 'shortest path through all cities u...
by BasicCoder2
Mar 07, 2024 11:28
Forum: Sources, Examples, Tips and Tricks
Topic: The Travelling Salesman Problem
Replies: 21
Views: 1272

Re: The Travelling Salesman Problem

Lothar Schirm Works ok for me? When I hit the space bar once I get the circles (towns). Hit the space bar again straight lines join up the towns from red to green circle. Hit the space bar again and another random number of towns at random positions appear. Hit the space bar again and they join up. ...
by BasicCoder2
Feb 04, 2024 21:48
Forum: Sources, Examples, Tips and Tricks
Topic: Free ChatGPT
Replies: 12
Views: 769

Re: Free ChatGPT

@neil Thanks for these links to ai chat it has been fun. I thought I would search for links on how these programs could write code from a description and then thought why not ask the AI :) It didn't actually explain how it was done in any detail only that it was done using predefined templates and a...
by BasicCoder2
Feb 04, 2024 8:18
Forum: Sources, Examples, Tips and Tricks
Topic: Free ChatGPT
Replies: 12
Views: 769

Re: Free ChatGPT

@neil It amazes me. Until now I haven't really tried it myself as you had to sign up first. Although its responses may only be something to work from it seems promising in the future. I asked it for code for another problem without mentioning the language and it gave me a Python example. I read that...
by BasicCoder2
Feb 04, 2024 7:25
Forum: Sources, Examples, Tips and Tricks
Topic: Free ChatGPT
Replies: 12
Views: 769

Re: Free ChatGPT

How is it able to do that? !!! This is what it gave me, #include "fbgfx.bi" #include "math.bi" const SCREEN_WIDTH = 800 const SCREEN_HEIGHT = 600 dim as integer asteroid_size = 10 dim as integer asteroid_x = SCREEN_WIDTH / 2 dim as integer asteroid_y = SCREEN_HEIGHT / 2 dim as i...
by BasicCoder2
Jan 24, 2024 23:49
Forum: Sources, Examples, Tips and Tricks
Topic: ANT SIMULATIONS
Replies: 3
Views: 371

Re: ANT SIMULATIONS

@badidea When I watched real ants in the foraging mode (going around and around an area) I marked their paths and saw squiggles. it seems a probability thing where the most probable is forward and varying degrees of veering left or right but the sharper the turn the less likely it happens. When my s...