BlaisePascalMagazine 53 UK
BlaisePascalMagazine 53 UK
BlaisePascalMagazine 53 UK
A N D P A S C AL R E L A T E D L A N G U A G E S
A N D R O I D, I O S, M A C, W I N D O W S & L I N U X
ARTIFICIAL INTELLIGENCE
CREATE AND TRAIN YOUR FIRST NEURAL NETWORK
BOIAN MITOV
CONTENTS
INTERVIEW WITH ATANAS POPOV
CEO OF EMBARCADEO ABOUT DELPHI AND ITS FUTURE PAGE 5
BY DETLEF OVERBEEK, PHOTGRAPHY BY RIK SMIT
WHO!? ME!?
HUMOR BY KIM MADSEN PAGE 14
Advertisers
Barnsten Page 15
Blaise Pascal Magazine
special offer book + usb librabry Page 13
Components 4 Developers Page 40
Free Pascal an Lazarus Foundation Page 16 Publisher: Foundation for Supporting the Pascal Programming Language
MITOV SOFTWARE Page 20 in collaboration with the Dutch Pascal User Group (Pascal Gebruikers Groep)
Stichting Ondersteuning Programmeertaal Pascal
Max Kleiner
www.softwareschule.ch
max @ kleiner.com
Wim Van Ingen Schenau -Editor Peter van der Sman Rik Smit
wisone @ xs4all.nl sman @ prisman.nl rik @ blaisepascal.eu
www.romplesoft.de
Editor - in - chief
Detlef D. Overbeek, Netherlands Tel.: +31 (0)30 890.66.44 / Mobile: +31 (0)6 21.23.62.68
News and Press Releases email only to [email protected]
Editors
Peter Bijlsma, W. (Wim) van Ingen Schenau, Rik Smit,
Correctors
Howard Page-Clark, James D. Duff
Trademarks
All trademarks used are acknowledged as the property of their respective owners.
Caveat Whilst we endeavour to ensure that what is published in the magazine is correct, we cannot accept responsibility for any errors or omissions.
If you notice something which may be incorrect, please contact the Editor and we will publish a correction where relevant.
Subscriptions ( 2013 prices )
1: Printed version: subscription 80.-- Incl. VAT 6 % (including code, programs and printed magazine,
10 issues per year excluding postage).
2: Electronic - non printed subscription 50.-- Incl. VAT 21% (including code, programs and download magazine)
Subscriptions can be taken out online at www.blaisepascal.eu or by written order, or by sending an email to [email protected]
Subscriptions can start at any date. All issues published in the calendar year of the subscription will be sent as well.
Subscriptions run 365 days. Subscriptions will not be prolonged without notice. Receipt of payment will be sent by email.
Subscriptions can be paid by sending the payment to:
ABN AMRO Bank Account no. 44 19 60 863 or by credit card: Paypal
Name: Pro Pascal Foundation-Foundation for Supporting the Pascal Programming Language (Stichting Ondersteuning Programeertaal Pascal)
IBAN: NL82 ABNA 0441960863 BIC ABNANL2A VAT no.: 81 42 54 147 (Stichting Programmeertaal Pascal)
Subscription department Edelstenenbaan 21 / 3402 XA IJsselstein, The Netherlands / Tel.: + 31 (0) 30 890.66.44 / Mobile: + 31 (0) 6 21.23.62.68
[email protected]
Copyright notice
All material published in Blaise Pascal is copyright SOPP Stichting Ondersteuning Programeertaal Pascal unless otherwise noted and may
not be copied, distributed or republished without written permission. Authors agree that code associated with their articles will be made
available to subscribers after publication by placing it on the website of the PGG for download, and that articles and code will be placed on
distributable data storage media. Use of program listings by subscribers for research and study purposes is allowed, but not for commercial
purposes. Commercial use of program listings and code is prohibited without the written permission of the author.
V
DAVID DIRKSE COMPUTER MATH & GAMES IN PASCAL
ath
FOR 75 EUROS + SHIPPING
D A ales
at
pres laisepas
cal.e
u/Da
vidD
irkse
/Compu
terM
INCLUDING:
w w .b
w
53 projects and code fully explained.
HOWARD PAGE-CLARK
end;
end;
L I B R A R Y 2 0 1 6
TH & 3 4
MA 1 2 5
UTER PASCAL
6 10 12
7 8 9
M P 11
CO S IN
13
14 15 16 17
18 19
ME 20 25 26
27
GA 28
21
22 23 24
33
34 35 36
29 30 31 32
40 41 42
37 38 43
39 45+ 47 48 49
POCKET EDITION 44 46
50
Also printed in full color. 51
A fully indexed PDF file is included.
Resize, rotate, compress digital images.
Design your own font, generate and reduce Truth
Tables from Boolean algebra.
And more important: understand how it all works!
The book contains 87 chapters, 53 projects with
source code and compiled programs (exe).
The book is highly educational and suitable for
beginners as well as for professionals. WINDOWS 10
function.
Solve systems of equations, calculate the area
of complex polygons. THE FAMOUS LIBRARY STICK
Draw lines, circles and ellipses. Newest technique USB 3 / 16 GB
you receive the library of the magazine updated
For the games, winning strategies are explained.
from issue 1 to issue 51. See details at
For puzzles the search algorithm.
For all projects: the math behind is thoroughly http://www.blaisepascal.eu/subscribers/
discussed. UK/UK_CD_DVD_USB_Department.html
COMBINATION
BOOK INCLUDING THE LIBRARY STICK EXCL. SHIPPING 75
http://www.blaisepascal.eu/david_dirkse/UK_Book_Department_DavData.html
DAY 2
DAY 3
REST Debugger
Explore. Understand. Integrate
Directly copy and paste REST components from the REST Debugger to the RAD
Studio, Delphi or C++Builder IDE. This enables configuration and consumption of
REST services in Delphi or C++Builder apps with just a few clicks!
Escape the mire of debugging REST calls in code and use the REST Debugger to fast
track data-rich prototyping with apps built using Delphi or C++Builder.
A NEW HORIZON
FOR LAZARUS
AND FREE PASCAL
W2 u y
X2 + F(u)
ul
X3 W3
22
ARTIFICIAL INTELLIGENCE PAGE 4/9
CREATE AND TRAIN YOUR FIRST NEURAL NETWORK
Type neur in the Tool Palette search box, In the Object Inspector Click on the button
then select TILNeuralNetwork from the palette: and select the ILNeuralNetwork1
component:
Expand the Points property of the channel, Set the name of the second channel to Predict,
and set its Visible sub-property to True: then expand the Points property of the channel,
and set its Visible sub-property to True:
const
SAMPLES = 26;
begin
// Train the Neural Network
ATrainingData := TSLRealMatrixBuffer.CreateSize( SAMPLES, 1 );
AResponses := TSLRealMatrixBuffer.CreateSize( SAMPLES, 1 );
SLScope1.Channels[ 0 ].Data.Clear();
SLScope1.Channels[ 1 ].Data.Clear();
end;
"You may need to click on the "Run" button a couple of times until the Neural Network is trained well."
The red line is the training data with the training Boian Mitov is a software developer and founder of
points shown as red circles. The green line is the Mitov Software http://www.mitov.com,
result of the testing of the trained neural network. specialized in the areas of Video, Audio, Digital
This is one of the simplest demonstrations of Signal Processing, Data Acquisition, Hardware
Artificial Intelligence Classifier. Control, Industrial Automation, Communications,
It is not as interesting as image or speech Computer Vision, Artificial Intelligence, parallel and
distributed computing.
recognition, but it is a good simple example of
He has over 30 years of overall programming
Neural Network application. experience, and 20 years of Delphi experience in
large variety of software problems.
In the following Articles however we will dig deeper
He is author of the OpenWire open source
into the exciting world of AI, and will do more
technology: http://www.openwire.org, the
interesting and complex projects, involving image
IGDI+ open source library:
and voice pattern recognition.
http://www.igdiplus.org, the VideoLab,
SignalLab, AudioLab, PlotLab, InstrumentLab,
VisionLab, IntelligenceLab, LogicLab, AnimationLab,
CommunicationLab, Visual Live Bindings, the free
Mitov.Runtime libraries: http://www.mitov.com,
OpenWire Studio -
http://www.openwirestudio.com, Visuino
https://www.visuino.com/ and the VCL for
Visual C++ technology: www.mitov.com.
Boian Mitov is also a founding member of the Free
Pascal and Lazarus Foundation.
http://foundation.freepascal.org/
Before you create an Android emulator, you need If you installed the Android SDK and NDK during
to install an Android system image that your RAD Studio installation, a valid Android system
emulators can use. image should already be shown as Installed in the
Android SDK Manager. In this case, you do not
What is the System Image?
need to install another Android system image.
In desktop and laptop computers, the System Image is
Follow these steps:
basically the operating system (Windows, Mac, Linux,
Unix, etc.) that you spend all your time in. You turn on 1. Start the Android SDK Manager
your computer, wait while it boots, then run all your (select Start | All Programs | Embarcadero RAD
apps and do all your work on the desktop which lives Studio | Android Tools).
inside the System Image. On Android its not that 2. In the packages tree, locate and check the
dissimilar. ARM EABI v7a System Image node within the
When Android boots up it takes you right into the first Android node in the list. For example:
System Image. Most users spend their lives running the
Android 4.2.2 (API 17) or Android 4.3 (API
stock.System Image the one that came pre-installed
18)
on their phone or tablet. That image contains all the
settings, configurations, and apps that both the OEM
and the carrier have decided are best for you. They
update it whenever they get around to it (unless they
have a new phone or tablet that they want you to buy).
To create an Android emulator on your system, In the Create new Android Virtual Device (AVD) dialog
follow these steps: box, select an Android device to emulate, and enter
1. Start the Android SDK Manager (select Start | the details describing the Android device you want
All Programs | Embarcadero RAD Studio | to emulate. In order to run the Multi Device Aplication
Android SDKs | Android AVD Manager). the Android emulator must meet the following
2. In the Android Virtual Device Manager, click requirements:
the New button to create a new virtual 1. In Target, select an Android SDK with an
device. API level that is 17 or higher. The drop-down
list contains your installed versions of the
Android SDK.
2. Under Emulation Options,
check Use Host GPU.
3. In Device, select the Android device
Delphi lists your Android Emulators in the Project EMULATORS ARE NOTORIOUSLY SLOW TO
Manager, within the Target node of the Android Target START AND TO RUN, SO STARTING THE
platform node.
EMULATOR BEFOREHAND MEANS THAT
NOTE:
YOUR APP CAN GET TO THE EMULATOR
As a reference, here are the default installed
locations of the Android development tools as MORE QUICKLY.
installed by the RAD Studio installer:
If you need to start the Android SDK Manager
directly, here is its location:
Path for Win 7
c:\Users\Public\Documents\RAD Studio
\12.0\PlatformSDKs\
adt-bundle-windows-x86-20130522
\SDK Manager.exe
This is Delphi XE 5 (12)
c:\Users\Public\Documents\
Embarcadero\Studio\18.0\ The recommended way to start an Android
PlatformSDKs\ emulator is by using the Android Virtual Device
android-sdk-windows\SDK Manager, which can be started from the Android
Manager.exe SDK Manager.
This is Delphi Berlin (18) To start an Android emulator such as the default
emulator installed in Delphi:
If SDK Manager.exe does not start, use 1. Start the Android Virtual Device Manager
Android.bat,which is located here: (select Start | All Programs | Embarcadero RAD
C:\Users\Public\Documents\ Studio | Android SDKs | Android AVD Manager).
RAD Studio\12.0\PlatformSDKs\
adt-bundle-windows-x86-20130522\
sdk\tools\android.bat
This is Delphi XE 5 (12)
c:\Users\Public\Documents\
Embarcadero\Studio\18.0\
PlatformSDKs\
android-sdk-windows\tools\
This is Delphi Berlin (18)
COMPONENTS
4
8 monitor support, texture detection,
compression and clipboard sharing.
DEVELOPERS
EESB, SOA,MoM, EAI TOOLS FOR INTELLIGENT SOLUTIONS. kbmMW IS THE PREMIERE N-TIER PRODUCT FOR DELPHI /
C++BUILDER BDS DEVELOPMENT FRAMEWORK FOR WIN 32 / 64, .NET AND LINUX WITH CLIENTS RESIDING ON WIN32 / 64,
.NET, LINUX, UNIX MAINFRAMES, MINIS, EMBEDDED DEVICES, SMART PHONES AND TABLETS.