Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Heisenberg may have been here.


devel / comp.lang.ada / Re: Artificial Intelligence libraries in ADA

SubjectAuthor
* Re: Artificial Intelligence libraries in ADARoger Mc
`* Re: Artificial Intelligence libraries in ADAJ-P. Rosen
 `- Re: Artificial Intelligence libraries in ADADmitry A. Kazakov

1
Re: Artificial Intelligence libraries in ADA

<a48306e3-c84f-488f-97a0-177e49a2d9e1n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9182&group=comp.lang.ada#9182

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:9607:0:b0:6ff:ca92:2678 with SMTP id y7-20020a379607000000b006ffca922678mr1752258qkd.612.1673229410003;
Sun, 08 Jan 2023 17:56:50 -0800 (PST)
X-Received: by 2002:a05:6214:5297:b0:4c7:39a8:d333 with SMTP id
kj23-20020a056214529700b004c739a8d333mr4304117qvb.0.1673229409786; Sun, 08
Jan 2023 17:56:49 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sun, 8 Jan 2023 17:56:49 -0800 (PST)
In-Reply-To: <53481976-aebc-4d6d-bb8f-aa4f63f0b01b@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=118.208.175.58; posting-account=d51RWwoAAADvR-x0zYAtT9z3CRxT1eXo
NNTP-Posting-Host: 118.208.175.58
References: <53481976-aebc-4d6d-bb8f-aa4f63f0b01b@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a48306e3-c84f-488f-97a0-177e49a2d9e1n@googlegroups.com>
Subject: Re: Artificial Intelligence libraries in ADA
From: rogermcm2@gmail.com (Roger Mc)
Injection-Date: Mon, 09 Jan 2023 01:56:49 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2884
 by: Roger Mc - Mon, 9 Jan 2023 01:56 UTC

On Wednesday, July 10, 2019 at 5:25:50 PM UTC+10, Daniel wrote:
> Does anybody knows pure Ada libraries for AI?
>
> Specially, I'm interested in Decission Trees, but I can't find anything on internet.
>
> I case of a negative answer, does anybody knows a good CPU perforamnce AI C/C++ Library working good binded to Ada code?

I had a similar need involving TensorFlow.
After much investigation I decided on the method suggested by

http://www.inspirel.com/articles/Ada_Python_Demo.html
This demo is rather simplistic and required some slight extension to be useful, mainly involving the passing of parameters to Python methods.

I now have developed a fairly extensive, though probably far from complete, binding based on the inspirel method.
An example of its use:
Python.Initialize;
MLP := Python.Import_File ("lesson_4cp");
Python.Call (MLP, "classify", Train_X, Train_Y_1D, Test_X, Test_Y_1D);
Python.Close_Module (MLP);
Python.Finalize;

where the Python.Call is to:
procedure Call (M : Module; Function_Name : String;
A : ML_Arrays_And_Matrices.Real_Float_Matrix;
B : ML_Arrays_And_Matrices.Integer_Array;
C : ML_Arrays_And_Matrices.Real_Float_Matrix;
D : ML_Arrays_And_Matrices.Integer_Array);

I decided on the inspirel method as it seems fairly straightforward and requires no 3rd party packages.
It only involves the Python C Api interface, for example:
function PyImport_Import (Obj : PyObject) return PyObject;
pragma Import (C, PyImport_Import, "PyImport_Import");

During my research I didn't come across many of the very interesting solutions mentioned in this conversation.

Re: Artificial Intelligence libraries in ADA

<tpgrfk$552m$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9183&group=comp.lang.ada#9183

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: rosen@adalog.fr (J-P. Rosen)
Newsgroups: comp.lang.ada
Subject: Re: Artificial Intelligence libraries in ADA
Date: Mon, 9 Jan 2023 11:49:24 +0100
Organization: Adalog
Lines: 33
Message-ID: <tpgrfk$552m$1@dont-email.me>
References: <53481976-aebc-4d6d-bb8f-aa4f63f0b01b@googlegroups.com>
<a48306e3-c84f-488f-97a0-177e49a2d9e1n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 9 Jan 2023 10:49:24 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="d0d1da3431be09d83cddb94d62a28e0a";
logging-data="169046"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18sZhTuj9wz7+OeFymY+0DS"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:CrCUVCdlAhpNbnqqhvy6pRFVCTw=
Content-Language: fr, en-US
In-Reply-To: <a48306e3-c84f-488f-97a0-177e49a2d9e1n@googlegroups.com>
 by: J-P. Rosen - Mon, 9 Jan 2023 10:49 UTC

Just for fun, I typed the subject ("Artificial Intelligence libraries in
ADA") into https://chat.openai.com/chat. Here is the answer...

--------------------------

There are several libraries that offer artificial intelligence (AI)
functionality in the Ada programming language. Here are a few examples:

AI-Ada: This library provides various AI algorithms and data structures,
including search algorithms, decision trees, and neural networks.

Ada Neural Network Library (ANN): This library provides tools for
creating and training artificial neural networks in Ada. It includes
support for various types of networks and training algorithms.

AdaBoost: This library provides an implementation of the AdaBoost
(Adaptive Boosting) machine learning algorithm, which is used for
classification tasks.

AdaMILE: This library provides various machine learning algorithms for
Ada, including support for decision trees, neural networks, and clustering.

It's worth noting that these libraries may not be as feature-rich or
well-maintained as some of the more popular AI libraries available in
other programming languages. However, they can still be useful for
certain projects or as a way to learn more about AI and machine learning.

--
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
https://www.adalog.fr https://www.adacontrol.fr

Re: Artificial Intelligence libraries in ADA

<tpgtav$11b5$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9185&group=comp.lang.ada#9185

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!rocksolid2!i2pn.org!aioe.org!QJLXApsvkYYOaKx3c4LRTg.user.46.165.242.91.POSTED!not-for-mail
From: mailbox@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Artificial Intelligence libraries in ADA
Date: Mon, 9 Jan 2023 12:21:04 +0100
Organization: Aioe.org NNTP Server
Message-ID: <tpgtav$11b5$1@gioia.aioe.org>
References: <53481976-aebc-4d6d-bb8f-aa4f63f0b01b@googlegroups.com>
<a48306e3-c84f-488f-97a0-177e49a2d9e1n@googlegroups.com>
<tpgrfk$552m$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="34149"; posting-host="QJLXApsvkYYOaKx3c4LRTg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Dmitry A. Kazakov - Mon, 9 Jan 2023 11:21 UTC

On 2023-01-09 11:49, J-P. Rosen wrote:

> It's worth noting that these libraries may not be as feature-rich or
> well-maintained as some of the more popular AI libraries available in
> other programming languages. However, they can still be useful for
> certain projects or as a way to learn more about AI and machine learning.

I am always perplexed by such questions. A decision tree is not a method
of machine learning, it is just a data structure.

Depending on the type (crisp, probabilistic, fuzzy) a tree is quite easy
to implement in Ada. And with any existing component library or else the
standard Ada library, it is almost trivial.

The crux is building such a tree from the samples so that the tree would
classify the input, i.e. to learn from the training set. It puzzles me
what people are expecting. Initial training and maybe reinforcement
training are highly dependent on the problem at hand. There is no
universal solution, otherwise it would not be AI. Depending on the
training method specific tree operations are used such as rotations etc
which require certain ways of tree representation especially if the
problem size is massive. All this is very, very specific.

The bottom line. Instead of looking for some miracles, just use Ada,
which is an excellent language for AI (because AI requires performance
and is almost impossible to debug).

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


devel / comp.lang.ada / Re: Artificial Intelligence libraries in ADA

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor