DeepSeek AI

Here you can talk about anything related to BBC BASIC, not covered in another category
Richard Russell
Posts: 272
Joined: Tue 18 Jun 2024, 09:32

Re: DeepSeek AI

Post by Richard Russell »

Richard Russell wrote: Tue 11 Feb 2025, 15:01 I asked DeepSeek to write BBC BASIC code for a two-input, two-layer Perceptron and this is what it produced.
The tabular output from the program doesn't give any indication of what the Perceptron does with input values other than the 'ideal' 0.0 and 1.0, so I got it to plot the entire 'landscape' of results with each input varying over the full range:

perceptron.jpg

Interestingly, although this particular output represents a near-perfect result, the learning process (even with 10,000 iterations) doesn't reliably generate it. Some runs give very different results, which whilst still solving the exclusive-or problem are far more 'marginal'. This is presumably because with training data consisting of only four different states, and nine weights to adjust, the model is under-constrained.
You do not have the required permissions to view the files attached to this post.
Richard Russell
Posts: 272
Joined: Tue 18 Jun 2024, 09:32

Re: DeepSeek AI

Post by Richard Russell »

Here's a hint for anybody asking DeepSeek for help in writing a BBC BASIC program. If you know that your program is going to need some BB4W or BBCSDL-specific features, or is going to need to call functions in one or more libraries, click on the paperclip icon on the DeepSeek front page and upload any relevant documentation, such as sections from the BB4W or BBCSDL manual. That may involve downloading them to your PC first.

It's entirely possible that those documents, if online, have already been ingested by DeepSeek during its training phase, but explicitly uploading them will ensure that they are taken into account and may raise their priority in its deliberations (although I don't know for sure that's the case). You must re-upload them in every session, DeepSeek won't remember them from one session to the next.

I've not tried this myself but in principle it should be a useful way of improving its understanding of BBC BASIC. With better known languages (e.g. C or Python), and therefore much more online material available for training, AIs are now approaching or exceeding the skills of the very best human programmers (one recent test assessed an AI as being better than 99.8% of human coders).