SlideShare ist ein Scribd-Unternehmen logo
1 von 40
AI Programming
with JAVA
By:Virat Andodariya
M.S.University
1
How Artificial Intelligence Programmed?
Java Basics
Graph coloring Problem
Uniform Cost Search
Contents
2
How Artificial Intelligence Programmed?
C++
C#
Java
Lisp
Python
3
Java Basics
• The Java Virtual Machine
• Applications & Applets
• Classes & Objects
• Start up Java
• Variables & Assignments
• Strings & Characters
• Arithmetic Operators & Expressions
• Comments
• Keywords
• Creating and Compiling Programs
• Modifiers
4
Bytecodes and the Java Virtual Machine
5
Java Program
• Java Application Program
– Application
• Program written in general programming language
– Applet
• Program running in Web Browser Environment
• Can be viewed by appletviewer or Web browser with
JVM
6
Classes and Objects
• Object
– Memory Space to Define State and Operation
– Instance of Class
• Class
– A class is a template or blueprint for objects. To program in
Java, you must understand classes and be able to write and
use them.
– Template of Creating Object
7
The Java Class Libraries
• java.applet : Applet related
• java.awt : Abstract Window Toolkit
• java.awt.event : Event process from awt component
• java.awt.image : Image processing
• java.beans : JavaBeans Component
• java.io : File or Network I/O Support
• java.lang : Java Language Support
• java.net : Network related functions
• java.util : Utility function
8
Start a Java Application
9
Variables and Assignments
• Types
– char 16bits Unicode character data
– boolean Boolean Variable
– byte 8 bits signed integer
– short 16 bits signed integer
– int 32 bits signed integer
– long 64 bits signed integer
– float 32 bits signed floating point number
– double 64 bits signed floating point number
10
Variables and Assignments
• String : sequence of character
String s = “Enter an integer value: ” ;
• Concatenation Operator ‘+’
String s = “Lincoln said: ” + “” Four score and seven years
ago”” ;
Result :
Lincoln said: “Four score and seven years ago”
11
Comments
• Single Line Comment
– int i = 10 ; // i is counter
• Multiple Line Comment
/*
Some comments
*/
• Documentation Comment
/**
Documentation Comment
*/
12
Java Keywords
• 50 Java Keywords
abstract double int super
boolean else interface s witch
break extends long synchronized
byte final native this
case finally new throw
catch float package throws
char for private transient*
class goto* protected try
const* if public void
continue implements return volatile
default import short while
do instanceof static strictfp
assert (New in 1.5) enum (New in 1.5)
13
Control Statement
• A statement represents an action or a sequence of actions.
To change the execution order of program
• As the method of controlling the execution order
– Conditional Statement : if St., switch St.
– Repeat Statement : for St., while St., do-while St.
– Branch Statement : break St., continue St., return St.
14
For Statement
 Repeat the sequence of statement as many as defined.
 Form of for statement
for ( <expr. 1> ; < expr. 2> ; < expr. 3>)
<statement>
 <expr. 1> : initialize the control variable
 <expr. 2> : check the control variable
 <expr. 3> : modify the control variable
s = 0;
for (i=1; i<=N; ++i) // sum from 1 to N : i increment
s += i;
15
Break Statement
• To move control to the out of the block
• From of break statement
break [label] ;
16
Source Code
Create/Modify Source Code
Compile Source Code
i.e. javac Welcome.java
Bytecode
Run Byteode
i.e. java Welcome
Result
If compilation errors
If runtime errors or incorrect result
17
Modifiers
Java uses certain reserved words called modifiers that specify
the properties of the data, methods, and classes and how
they can be used.
Examples of modifiers are public and static. Other modifiers are
private, final, abstract, and protected. A public datum,
method, or class can be accessed by other programs. A
private datum or method cannot be accessed by other
programs.
18
Graph coloring Problem
Graph In Matrix
19
Graph Coloring
20
21
22
23
24
Result
25
UniformCostSearch
26
27
28
29
30
31
32
33
34
35
36
37
38
References
• Java™ 2:The Complete Reference,Fifth Edition
Herbert Schildt
• JDK Developer Kit
• JGRASP (CSD) Compiler
39
Thank you
40

Weitere ähnliche Inhalte

Was ist angesagt?

Navigation and Control LabVIEW Robotics.ppt
Navigation and Control LabVIEW Robotics.pptNavigation and Control LabVIEW Robotics.ppt
Navigation and Control LabVIEW Robotics.pptSyarifulSyafiqShamsu1
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Gaurav Mittal
 
ARTIFICIAL INTELLIGENCE & NEURAL NETWORKS
ARTIFICIAL INTELLIGENCE & NEURAL NETWORKSARTIFICIAL INTELLIGENCE & NEURAL NETWORKS
ARTIFICIAL INTELLIGENCE & NEURAL NETWORKSEr Kaushal
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimizationJoy Dutta
 
Computer Graphics Notes (B.Tech, KUK, MDU)
Computer Graphics Notes (B.Tech, KUK, MDU)Computer Graphics Notes (B.Tech, KUK, MDU)
Computer Graphics Notes (B.Tech, KUK, MDU)Rajesh Kamboj
 
Machine learning vs deep learning
Machine learning vs deep learningMachine learning vs deep learning
Machine learning vs deep learningUSM Systems
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine LearningLior Rokach
 
Tic tac toe game with graphics presentation
Tic  tac  toe game with graphics presentationTic  tac  toe game with graphics presentation
Tic tac toe game with graphics presentationPrionto Abdullah
 
Unit 3
Unit 3Unit 3
Unit 3ypnrao
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Suraj Aavula
 
Artificial Intelligence in Biodiversity and Citizen Science
Artificial Intelligence in Biodiversity and Citizen ScienceArtificial Intelligence in Biodiversity and Citizen Science
Artificial Intelligence in Biodiversity and Citizen ScienceKatina Michael
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing ThesisHemant Sharma
 
Interconnection Network
Interconnection NetworkInterconnection Network
Interconnection NetworkAli A Jalil
 
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdfMATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdfCentral university of Haryana
 
Emotion recognition using image processing in deep learning
Emotion recognition using image     processing in deep learningEmotion recognition using image     processing in deep learning
Emotion recognition using image processing in deep learningvishnuv43
 

Was ist angesagt? (20)

Navigation and Control LabVIEW Robotics.ppt
Navigation and Control LabVIEW Robotics.pptNavigation and Control LabVIEW Robotics.ppt
Navigation and Control LabVIEW Robotics.ppt
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)
 
ARTIFICIAL INTELLIGENCE & NEURAL NETWORKS
ARTIFICIAL INTELLIGENCE & NEURAL NETWORKSARTIFICIAL INTELLIGENCE & NEURAL NETWORKS
ARTIFICIAL INTELLIGENCE & NEURAL NETWORKS
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimization
 
Computer Graphics Notes (B.Tech, KUK, MDU)
Computer Graphics Notes (B.Tech, KUK, MDU)Computer Graphics Notes (B.Tech, KUK, MDU)
Computer Graphics Notes (B.Tech, KUK, MDU)
 
Machine learning vs deep learning
Machine learning vs deep learningMachine learning vs deep learning
Machine learning vs deep learning
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Cellular neural
Cellular  neuralCellular  neural
Cellular neural
 
Editor structure
Editor structureEditor structure
Editor structure
 
Tic tac toe game with graphics presentation
Tic  tac  toe game with graphics presentationTic  tac  toe game with graphics presentation
Tic tac toe game with graphics presentation
 
z transforms
z transformsz transforms
z transforms
 
Unit 3
Unit 3Unit 3
Unit 3
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)
 
Fuzzy c means manual work
Fuzzy c means manual workFuzzy c means manual work
Fuzzy c means manual work
 
Artificial Intelligence in Biodiversity and Citizen Science
Artificial Intelligence in Biodiversity and Citizen ScienceArtificial Intelligence in Biodiversity and Citizen Science
Artificial Intelligence in Biodiversity and Citizen Science
 
Church Turing Thesis
Church Turing ThesisChurch Turing Thesis
Church Turing Thesis
 
Intelligent agents
Intelligent agentsIntelligent agents
Intelligent agents
 
Interconnection Network
Interconnection NetworkInterconnection Network
Interconnection Network
 
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdfMATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
MATLAB-Cheat-Sheet-for-Data-Science_LondonSchoolofEconomics (1).pdf
 
Emotion recognition using image processing in deep learning
Emotion recognition using image     processing in deep learningEmotion recognition using image     processing in deep learning
Emotion recognition using image processing in deep learning
 

Andere mochten auch

artificial intelligence
artificial intelligenceartificial intelligence
artificial intelligenceNirali Mayani
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Hirofumi Iwasaki
 
Building Cognitive Applications with Watson APIs
Building Cognitive Applications with Watson APIs Building Cognitive Applications with Watson APIs
Building Cognitive Applications with Watson APIs Dev_Events
 
EIA2016Nice - Landry Holi_How AI Can Shape the Future of Travel
EIA2016Nice - Landry Holi_How AI Can Shape the Future of TravelEIA2016Nice - Landry Holi_How AI Can Shape the Future of Travel
EIA2016Nice - Landry Holi_How AI Can Shape the Future of TravelEuropean Innovation Academy
 
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Reza Rahman
 
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsMurat Yener
 
Java EE 8 Recipes
Java EE 8 RecipesJava EE 8 Recipes
Java EE 8 RecipesJosh Juneau
 
Java EE 8 - February 2017 update
Java EE 8 - February 2017 updateJava EE 8 - February 2017 update
Java EE 8 - February 2017 updateDavid Delabassee
 
Java EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJava EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJosh Juneau
 
Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the HorizonJosh Juneau
 
Artificial Intelligence in Project Management by Dr. Khaled A. Hamdy
Artificial Intelligence in Project Management by  Dr. Khaled A. HamdyArtificial Intelligence in Project Management by  Dr. Khaled A. Hamdy
Artificial Intelligence in Project Management by Dr. Khaled A. HamdyAgile ME
 
Barreras afectivas
Barreras afectivas Barreras afectivas
Barreras afectivas Emagister
 
Java EE 8: What Servlet 4 and HTTP2 Mean
Java EE 8: What Servlet 4 and HTTP2 MeanJava EE 8: What Servlet 4 and HTTP2 Mean
Java EE 8: What Servlet 4 and HTTP2 MeanAlex Theedom
 
JavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great MatchJavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great MatchReza Rahman
 
10 Revealing Statistics About Compensation & Benefits You should Know
10 Revealing Statistics About Compensation & Benefits You should Know10 Revealing Statistics About Compensation & Benefits You should Know
10 Revealing Statistics About Compensation & Benefits You should KnowElodie A.
 
Down-to-Earth Microservices with Java EE
Down-to-Earth Microservices with Java EEDown-to-Earth Microservices with Java EE
Down-to-Earth Microservices with Java EEReza Rahman
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 

Andere mochten auch (20)

artificial intelligence
artificial intelligenceartificial intelligence
artificial intelligence
 
Integrity
IntegrityIntegrity
Integrity
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8
 
Java EE Next
Java EE NextJava EE Next
Java EE Next
 
Building Cognitive Applications with Watson APIs
Building Cognitive Applications with Watson APIs Building Cognitive Applications with Watson APIs
Building Cognitive Applications with Watson APIs
 
EIA2016Nice - Landry Holi_How AI Can Shape the Future of Travel
EIA2016Nice - Landry Holi_How AI Can Shape the Future of TravelEIA2016Nice - Landry Holi_How AI Can Shape the Future of Travel
EIA2016Nice - Landry Holi_How AI Can Shape the Future of Travel
 
Deep Learning meetup
Deep Learning meetupDeep Learning meetup
Deep Learning meetup
 
Have You Seen Java EE Lately?
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?
 
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design Patterns
 
Java EE 8 Recipes
Java EE 8 RecipesJava EE 8 Recipes
Java EE 8 Recipes
 
Java EE 8 - February 2017 update
Java EE 8 - February 2017 updateJava EE 8 - February 2017 update
Java EE 8 - February 2017 update
 
Java EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJava EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVC
 
Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the Horizon
 
Artificial Intelligence in Project Management by Dr. Khaled A. Hamdy
Artificial Intelligence in Project Management by  Dr. Khaled A. HamdyArtificial Intelligence in Project Management by  Dr. Khaled A. Hamdy
Artificial Intelligence in Project Management by Dr. Khaled A. Hamdy
 
Barreras afectivas
Barreras afectivas Barreras afectivas
Barreras afectivas
 
Java EE 8: What Servlet 4 and HTTP2 Mean
Java EE 8: What Servlet 4 and HTTP2 MeanJava EE 8: What Servlet 4 and HTTP2 Mean
Java EE 8: What Servlet 4 and HTTP2 Mean
 
JavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great MatchJavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great Match
 
10 Revealing Statistics About Compensation & Benefits You should Know
10 Revealing Statistics About Compensation & Benefits You should Know10 Revealing Statistics About Compensation & Benefits You should Know
10 Revealing Statistics About Compensation & Benefits You should Know
 
Down-to-Earth Microservices with Java EE
Down-to-Earth Microservices with Java EEDown-to-Earth Microservices with Java EE
Down-to-Earth Microservices with Java EE
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 

Ähnlich wie AI Programming with JAVA - Graph Coloring and UCS

Android webinar class_java_review
Android webinar class_java_reviewAndroid webinar class_java_review
Android webinar class_java_reviewEdureka!
 
Introduction to java 101
Introduction to java 101Introduction to java 101
Introduction to java 101kankemwa Ishaku
 
Programming in java basics
Programming in java  basicsProgramming in java  basics
Programming in java basicsLovelitJose
 
Java class 1
Java class 1Java class 1
Java class 1Edureka!
 
Learn To Code: Introduction to java
Learn To Code: Introduction to javaLearn To Code: Introduction to java
Learn To Code: Introduction to javaSadhanaParameswaran
 
2.Getting Started with C#.Net-(C#)
2.Getting Started with C#.Net-(C#)2.Getting Started with C#.Net-(C#)
2.Getting Started with C#.Net-(C#)Shoaib Ghachi
 
JavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdfJavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdfkatarichallenge
 
Java developer trainee implementation and import
Java developer trainee implementation and importJava developer trainee implementation and import
Java developer trainee implementation and importiamluqman0403
 
Intro to javascript (6:19)
Intro to javascript (6:19)Intro to javascript (6:19)
Intro to javascript (6:19)Thinkful
 
Technical trainning.pptx
Technical trainning.pptxTechnical trainning.pptx
Technical trainning.pptxSanuSan3
 
Thinkful - Intro to JavaScript
Thinkful - Intro to JavaScriptThinkful - Intro to JavaScript
Thinkful - Intro to JavaScriptTJ Stalcup
 
Java Basics for selenium
Java Basics for seleniumJava Basics for selenium
Java Basics for seleniumapoorvams
 
JavaScript, VBScript, AJAX, CGI
JavaScript, VBScript, AJAX, CGIJavaScript, VBScript, AJAX, CGI
JavaScript, VBScript, AJAX, CGIAashish Jain
 
Programming Language
Programming  LanguageProgramming  Language
Programming LanguageAdeel Hamid
 
Synapseindia reviews.odp.
Synapseindia reviews.odp.Synapseindia reviews.odp.
Synapseindia reviews.odp.Tarunsingh198
 

Ähnlich wie AI Programming with JAVA - Graph Coloring and UCS (20)

Unit 1
Unit 1Unit 1
Unit 1
 
Android webinar class_java_review
Android webinar class_java_reviewAndroid webinar class_java_review
Android webinar class_java_review
 
Introduction to java 101
Introduction to java 101Introduction to java 101
Introduction to java 101
 
Introduction to c
Introduction to cIntroduction to c
Introduction to c
 
Introduction to C ++.pptx
Introduction to C ++.pptxIntroduction to C ++.pptx
Introduction to C ++.pptx
 
Programming in java basics
Programming in java  basicsProgramming in java  basics
Programming in java basics
 
Java 101
Java 101Java 101
Java 101
 
Java class 1
Java class 1Java class 1
Java class 1
 
Learn To Code: Introduction to java
Learn To Code: Introduction to javaLearn To Code: Introduction to java
Learn To Code: Introduction to java
 
2.Getting Started with C#.Net-(C#)
2.Getting Started with C#.Net-(C#)2.Getting Started with C#.Net-(C#)
2.Getting Started with C#.Net-(C#)
 
JavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdfJavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdf
 
Java developer trainee implementation and import
Java developer trainee implementation and importJava developer trainee implementation and import
Java developer trainee implementation and import
 
Intro to javascript (6:19)
Intro to javascript (6:19)Intro to javascript (6:19)
Intro to javascript (6:19)
 
Java
Java Java
Java
 
Technical trainning.pptx
Technical trainning.pptxTechnical trainning.pptx
Technical trainning.pptx
 
Thinkful - Intro to JavaScript
Thinkful - Intro to JavaScriptThinkful - Intro to JavaScript
Thinkful - Intro to JavaScript
 
Java Basics for selenium
Java Basics for seleniumJava Basics for selenium
Java Basics for selenium
 
JavaScript, VBScript, AJAX, CGI
JavaScript, VBScript, AJAX, CGIJavaScript, VBScript, AJAX, CGI
JavaScript, VBScript, AJAX, CGI
 
Programming Language
Programming  LanguageProgramming  Language
Programming Language
 
Synapseindia reviews.odp.
Synapseindia reviews.odp.Synapseindia reviews.odp.
Synapseindia reviews.odp.
 

Kürzlich hochgeladen

INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxsomshekarkn64
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringJuanCarlosMorales19600
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsSachinPawar510423
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 

Kürzlich hochgeladen (20)

INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptx
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineering
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documents
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 

AI Programming with JAVA - Graph Coloring and UCS

  • 1. AI Programming with JAVA By:Virat Andodariya M.S.University 1
  • 2. How Artificial Intelligence Programmed? Java Basics Graph coloring Problem Uniform Cost Search Contents 2
  • 3. How Artificial Intelligence Programmed? C++ C# Java Lisp Python 3
  • 4. Java Basics • The Java Virtual Machine • Applications & Applets • Classes & Objects • Start up Java • Variables & Assignments • Strings & Characters • Arithmetic Operators & Expressions • Comments • Keywords • Creating and Compiling Programs • Modifiers 4
  • 5. Bytecodes and the Java Virtual Machine 5
  • 6. Java Program • Java Application Program – Application • Program written in general programming language – Applet • Program running in Web Browser Environment • Can be viewed by appletviewer or Web browser with JVM 6
  • 7. Classes and Objects • Object – Memory Space to Define State and Operation – Instance of Class • Class – A class is a template or blueprint for objects. To program in Java, you must understand classes and be able to write and use them. – Template of Creating Object 7
  • 8. The Java Class Libraries • java.applet : Applet related • java.awt : Abstract Window Toolkit • java.awt.event : Event process from awt component • java.awt.image : Image processing • java.beans : JavaBeans Component • java.io : File or Network I/O Support • java.lang : Java Language Support • java.net : Network related functions • java.util : Utility function 8
  • 9. Start a Java Application 9
  • 10. Variables and Assignments • Types – char 16bits Unicode character data – boolean Boolean Variable – byte 8 bits signed integer – short 16 bits signed integer – int 32 bits signed integer – long 64 bits signed integer – float 32 bits signed floating point number – double 64 bits signed floating point number 10
  • 11. Variables and Assignments • String : sequence of character String s = “Enter an integer value: ” ; • Concatenation Operator ‘+’ String s = “Lincoln said: ” + “” Four score and seven years ago”” ; Result : Lincoln said: “Four score and seven years ago” 11
  • 12. Comments • Single Line Comment – int i = 10 ; // i is counter • Multiple Line Comment /* Some comments */ • Documentation Comment /** Documentation Comment */ 12
  • 13. Java Keywords • 50 Java Keywords abstract double int super boolean else interface s witch break extends long synchronized byte final native this case finally new throw catch float package throws char for private transient* class goto* protected try const* if public void continue implements return volatile default import short while do instanceof static strictfp assert (New in 1.5) enum (New in 1.5) 13
  • 14. Control Statement • A statement represents an action or a sequence of actions. To change the execution order of program • As the method of controlling the execution order – Conditional Statement : if St., switch St. – Repeat Statement : for St., while St., do-while St. – Branch Statement : break St., continue St., return St. 14
  • 15. For Statement  Repeat the sequence of statement as many as defined.  Form of for statement for ( <expr. 1> ; < expr. 2> ; < expr. 3>) <statement>  <expr. 1> : initialize the control variable  <expr. 2> : check the control variable  <expr. 3> : modify the control variable s = 0; for (i=1; i<=N; ++i) // sum from 1 to N : i increment s += i; 15
  • 16. Break Statement • To move control to the out of the block • From of break statement break [label] ; 16
  • 17. Source Code Create/Modify Source Code Compile Source Code i.e. javac Welcome.java Bytecode Run Byteode i.e. java Welcome Result If compilation errors If runtime errors or incorrect result 17
  • 18. Modifiers Java uses certain reserved words called modifiers that specify the properties of the data, methods, and classes and how they can be used. Examples of modifiers are public and static. Other modifiers are private, final, abstract, and protected. A public datum, method, or class can be accessed by other programs. A private datum or method cannot be accessed by other programs. 18
  • 21. 21
  • 22. 22
  • 23. 23
  • 24. 24
  • 27. 27
  • 28. 28
  • 29. 29
  • 30. 30
  • 31. 31
  • 32. 32
  • 33. 33
  • 34. 34
  • 35. 35
  • 36. 36
  • 37. 37
  • 38. 38
  • 39. References • Java™ 2:The Complete Reference,Fifth Edition Herbert Schildt • JDK Developer Kit • JGRASP (CSD) Compiler 39