Artificial Intelligence in PB?
Artificial Intelligence in PB?
Since AI is awesome for some things.. I dunno why no one here (talented coders) is trying to find a way to use it the easy way in PB
I think the easiest way whould be using a C dll, but not sure.
I found this library:
http://leenissen.dk/fann/wp/
Do you think this can be used in PB directly?
Any other ideas?
I think the easiest way whould be using a C dll, but not sure.
I found this library:
http://leenissen.dk/fann/wp/
Do you think this can be used in PB directly?
Any other ideas?
Re: Artificial Intelligence in PB?
I'm still one of the newbies here and I wouldn't say AI is not possible with PB. But why?
I guess there's a reason why there's no real artificial intelligence out there yet. Alexa? Just a bunch of if statements and predefined internet search. Photo AI? Just selecting the predefined postprocessing algorithm by predefined choosing algorithms.
I for one neither think PB is the right language for a real approach, nor is the hardware it runs on.
But, of course, I may be horribly wrong...
I guess there's a reason why there's no real artificial intelligence out there yet. Alexa? Just a bunch of if statements and predefined internet search. Photo AI? Just selecting the predefined postprocessing algorithm by predefined choosing algorithms.
I for one neither think PB is the right language for a real approach, nor is the hardware it runs on.
But, of course, I may be horribly wrong...
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
Re: Artificial Intelligence in PB?
There have been several threads about neural networks (even with src) and other AI related threads.
Coding an AI with PB is ofc. possible but it all depends on time, skill and resources.
A game AI for example might be easy and way more feasable compared to a avoidance system for a car that doesnt kill people.
Coding an AI with PB is ofc. possible but it all depends on time, skill and resources.
A game AI for example might be easy and way more feasable compared to a avoidance system for a car that doesnt kill people.
Re: Artificial Intelligence in PB?
And the answer is ...
yes, it is possible to use the mentioned C library as dll directly in PB.
You need only to write a wrapper for the exported C functions.
yes, it is possible to use the mentioned C library as dll directly in PB.
You need only to write a wrapper for the exported C functions.
Re: Artificial Intelligence in PB?
Yes, I know about that threads, but they are very simplistic and obsolete. Today we need to be able to use something more robust, like TensorFlow.Mijikai wrote: ↑Sun Jul 25, 2021 10:23 am There have been several threads about neural networks (even with src) and other AI related threads.
Coding an AI with PB is ofc. possible but it all depends on time, skill and resources.
A game AI for example might be easy and way more feasable compared to a avoidance system for a car that doesnt kill people.
I haven't the Know to do this mi self, but I will research about it
Thanks to evey one!
-
- Enthusiast
- Posts: 556
- Joined: Wed Sep 25, 2019 10:18 am
Re: Artificial Intelligence in PB?
Is there an easy way to connect PureBasic 6.00 Alpha with C backend with FANN without wrapper?
http://fann.sourceforge.net/fann.html
FANN-2.2.0-Source.zip️
http://fann.sourceforge.net/fann.html
FANN-2.2.0-Source.zip️
Please ask your questions, because switch on the cognition apparatus decides on the only known life in the universe.Wersten :DDüsseldorf NRW Germany Europe Earth Solar System Flake Bubble Orionarm
Milky Way Local_Group Virgo Supercluster Laniakea Universe
Milky Way Local_Group Virgo Supercluster Laniakea Universe
Re: Artificial Intelligence in PB?
from what I've seen AI/ML is all about building neurons and synapses from big-data that is groomed by hand or automation first... It's not surprising that you don't see many threads on it...
Actually, if you go around communities that do a lot of stuff with pytorch you probably won't see much useful code either.. It's all about the data, and people aren't likely to share...
Probably the *wisest* thing that could be done on PB forum is a thread that gives source to a FNN(easiest type of neural network) that uses primitive data, so people can see what one really is. From there they could go on to learn FIS, RNN, DBN, ESN, BRNN etc...
Actually, if you go around communities that do a lot of stuff with pytorch you probably won't see much useful code either.. It's all about the data, and people aren't likely to share...
Probably the *wisest* thing that could be done on PB forum is a thread that gives source to a FNN(easiest type of neural network) that uses primitive data, so people can see what one really is. From there they could go on to learn FIS, RNN, DBN, ESN, BRNN etc...
The truth hurts.
Re: Artificial Intelligence in PB?
Python communities have lots of useful code, examples, and even entire projects.
For now, I do the AI with Python (I'm new to that language) and everything else with PB where I feel more comfortable, but it would be very interesting to be able to use powerful AI libraries in PB directly.
For now, I do the AI with Python (I'm new to that language) and everything else with PB where I feel more comfortable, but it would be very interesting to be able to use powerful AI libraries in PB directly.
- NicTheQuick
- Addict
- Posts: 1227
- Joined: Sun Jun 22, 2003 7:43 pm
- Location: Germany, Saarbrücken
- Contact:
Re: Artificial Intelligence in PB?
Looking at the Changelog I don't think you wanna use that nowadays.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Re: Artificial Intelligence in PB?
It's better than nothing, but anyway I don't hope a good solution for PB now, so in the mean time I try to use a mix of PB + Python
Re: Artificial Intelligence in PB?
Coding section : 20+ lines can recognize handwritten characters for AI code (by MiLoo)Caronte3D wrote: ↑Sat Jul 24, 2021 2:02 pm Since AI is awesome for some things.. I dunno why no one here (talented coders) is trying to find a way to use it the easy way in PB
I think the easiest way whould be using a C dll, but not sure.
I found this library:
http://leenissen.dk/fann/wp/
Do you think this can be used in PB directly?
Any other ideas?
Re: Artificial Intelligence in PB?
Thanks Olli, I already saw all the examples on the forum, but they are very simple far from the power available today.
Re: Artificial Intelligence in PB?
I use AI very extensively in my project, large networks and hundreds at the same time, each as a DLL loaded in a C++ console host.
They can do thousands of lookups per second.
The console host loads the DLL and it's functions along with the weight file.
Here is the C++ code for the console host without the header file code.
I had to move the loops to never execute at the bottom because it limits the lookups to a few per second.
I didn't write the code.
They can do thousands of lookups per second.
The console host loads the DLL and it's functions along with the weight file.
Here is the C++ code for the console host without the header file code.
I had to move the loops to never execute at the bottom because it limits the lookups to a few per second.
I didn't write the code.
Code: Select all
#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
#include "NNshell.h"
using namespace std;
enum {NSRecallNetwork, NSLearningNetwork};
int main()
{
HINSTANCE hDLL = LoadDLLFunctions("NN.dll");
if (hDLL)
{
void *nn;
createNetwork(nn, NSRecallNetwork);
loadWeights(nn,"Weights.nsw");
double *inputData = new double[758];
double *outputData = new double[2];
string inputstring;
for( ; ; ) {
getline(cin,inputstring);
int x=0;
stringstream ss(inputstring);
string field;
while (getline(ss,field,','))
{
stringstream fs(field);
fs >> inputData[x];
x++;
}
getResponse(nn, 1, inputData, outputData);
for (int i = 0; i < 2; ++i) {
cout << setprecision(10) << outputData[i];
cout << '\n';
}
}
delete[] inputData;
delete[] outputData;
destroyNetwork(nn);
FreeLibrary(hDLL);
}
return 0;
}
Re: Artificial Intelligence in PB?
Do you have a PB code we can try?
Re: Artificial Intelligence in PB?
I wanted to do it in PB but I couldn't figure it out.
I had to use a provided code in C++ instead.
It's blazing fast.
I'm sure many people here could very easily convert the code to PB.
I have no idea but I think you need to use prototypes.
Way beyond my 1980's style of programming.
I had to learn a little C++ to modify the way it did the output and waiting for each output to be read.
I had to use a provided code in C++ instead.
It's blazing fast.
I'm sure many people here could very easily convert the code to PB.
I have no idea but I think you need to use prototypes.
Way beyond my 1980's style of programming.
I had to learn a little C++ to modify the way it did the output and waiting for each output to be read.