The document describes a fire suppression system with rooms, sprinklers, fires and alarms. It defines classes for these concepts and provides rules to:
1) Turn on sprinklers in rooms with fires and turn them off when fires are gone.
2) Raise an alarm when any fire exists and cancel the alarm when all fires are gone.
3) Output a status message when there are no alarms or active sprinklers.
The rules are executed on a sample data set to demonstrate their behavior. Conditional elements, accumulation functions and timers are also briefly discussed.
This document explains how to build a deductive inference engine for rule-based systems, business rules. It leads to a useful architecure for Complex Event Processing and Data streams
Better yet, it is required that the behavior of an information system can be modified by the business expert, without having to wait for the computer service to be available.
The MRA enables the implementation of information systems driven by the job (action item), for the job and in the perspective of the job. Technical experts (developers) are concerned only by the application logic system while the business experts are responsible for the maintenance of the business (which changes often) in a zero-development environment using natural language publishers. The development cycle is, then, getting shorter because of the easier design for test scenarios, through coding, and business experts work closely with the technical team by participating in all phases of the life cycle and development. Hence, with the ARM, each field applications are run and managed by business experts in the field.
Getting started with Apache Camel - May 2013Claus Ibsen
This session will teach you how to get a good start with Apache Camel.
We will introduce you to Apache Camel and how Camel its related to Enterprise Integration Patterns. And how you go about using these patterns in Camel routes, written in Java code or XML files.
We will then discuss how you can get started developing with Camel, and how to setup a new project from scratch using Maven and Eclipse tooling.
This session includes live demos that show how to build Camel applications in Java, Spring, OSGi Blueprint and alternative languages such as Scala and Groovy.
You will also hear what other features Camel provides out of the box, which can make integration much easier for you.
Before opening up for QA, we will share useful links where you can dive into learning more about Camel.
This presentation was video taped which you can find here: http://javagruppen.dk/index.php/moder/historiske-moder/285-javagruppemode-115-apache-camel-i-aarhus
This document explains how to build a deductive inference engine for rule-based systems, business rules. It leads to a useful architecure for Complex Event Processing and Data streams
Better yet, it is required that the behavior of an information system can be modified by the business expert, without having to wait for the computer service to be available.
The MRA enables the implementation of information systems driven by the job (action item), for the job and in the perspective of the job. Technical experts (developers) are concerned only by the application logic system while the business experts are responsible for the maintenance of the business (which changes often) in a zero-development environment using natural language publishers. The development cycle is, then, getting shorter because of the easier design for test scenarios, through coding, and business experts work closely with the technical team by participating in all phases of the life cycle and development. Hence, with the ARM, each field applications are run and managed by business experts in the field.
Getting started with Apache Camel - May 2013Claus Ibsen
This session will teach you how to get a good start with Apache Camel.
We will introduce you to Apache Camel and how Camel its related to Enterprise Integration Patterns. And how you go about using these patterns in Camel routes, written in Java code or XML files.
We will then discuss how you can get started developing with Camel, and how to setup a new project from scratch using Maven and Eclipse tooling.
This session includes live demos that show how to build Camel applications in Java, Spring, OSGi Blueprint and alternative languages such as Scala and Groovy.
You will also hear what other features Camel provides out of the box, which can make integration much easier for you.
Before opening up for QA, we will share useful links where you can dive into learning more about Camel.
This presentation was video taped which you can find here: http://javagruppen.dk/index.php/moder/historiske-moder/285-javagruppemode-115-apache-camel-i-aarhus
Apache Camel is a very popular integration library that works very well with microservice architecture.
This talk introduces you to Apache Camel and how you can easily get started with Camel on your computer.
Then we cover how to create new Camel projects from scratch as micro services which you can boot using Camel or Spring Boot, or other micro containers such as Jetty or fat JARs. We then take a look at what options you have for monitoring and managing your Camel microservices
using tooling such as Jolokia, and hawtio web console.
The second part of this talk is about running Camel in the cloud. We start by showing you how you can use the Maven Docker Plugin to create a docker image of your Camel application and run it using docker on a single host. Then kubernetes enters the stage and we take a look at how you can deploy your docker images on a kubernetes cloud platform, and how thenfabric8 tooling can make this much easier for the Java developers.
At the end of this talk you will have learned about and seen in practice how to take a Java Camel project from scratch, turn that into a docker image, and how you can deploy those docker images in a scalable cloud platform based on Google's kubernetes.
Software application architecture is an interesting and broadly discussed topic. In this presentation, I am discussing N-Tier application architecture. Going to investigate: What is architecture? Kinds of N-Tier application architecture and its advantage and disadvantage.
There is also a very basic quiz at the end of the session.
En introduktion till IBM Business Process Management och Operational Decision Management.
Få mer insikt inom: BPM (http://www-03.ibm.com/software/products/sv/category/BPM-Software)
Cette présentation aborde plusieurs points :
* Qu'est-ce qu'un moteur de règles ?
* Drools, les alternatives et son historique.
* Résumé d'un comparatif de moteur de règles.
* Première règle, une règle simple !
* Règles lisibles pour un humain (DSL et Table de décision).
* Drools Guvnor (BRMS/BPMS, système de gestion de régles métiers).
* Drools Flow (Flow/WorkFlow).
* Drools Fusion (Event Processing).
* Performance :
o Algorithme de Rete
La présentation fut dense. En effet, le focus a été mis sur la dernière version de Drools, la version 5, qui propose énormément de fonctionnalités.
Le terme ‘Microservices’ fait le buzz depuis plusieurs mois déjà dans l’ingénierie logicielle. Durant cette soirée, Zenika vous propose de décrire en détail cette technique de décomposition de son système d’information.
La première partie de la soirée présente les enjeux des MicroServices et les différents cas d’utilisation.
La seconde partie aborde différents frameworks Java qui peuvent être utilisés pour la mise en place d’une architecture MicroServices.
Apache Camel is a very popular integration library that works very well with microservice architecture.
This talk introduces you to Apache Camel and how you can easily get started with Camel on your computer.
Then we cover how to create new Camel projects from scratch as micro services which you can boot using Camel or Spring Boot, or other micro containers such as Jetty or fat JARs. We then take a look at what options you have for monitoring and managing your Camel microservices
using tooling such as Jolokia, and hawtio web console.
The second part of this talk is about running Camel in the cloud. We start by showing you how you can use the Maven Docker Plugin to create a docker image of your Camel application and run it using docker on a single host. Then kubernetes enters the stage and we take a look at how you can deploy your docker images on a kubernetes cloud platform, and how thenfabric8 tooling can make this much easier for the Java developers.
At the end of this talk you will have learned about and seen in practice how to take a Java Camel project from scratch, turn that into a docker image, and how you can deploy those docker images in a scalable cloud platform based on Google's kubernetes.
Software application architecture is an interesting and broadly discussed topic. In this presentation, I am discussing N-Tier application architecture. Going to investigate: What is architecture? Kinds of N-Tier application architecture and its advantage and disadvantage.
There is also a very basic quiz at the end of the session.
En introduktion till IBM Business Process Management och Operational Decision Management.
Få mer insikt inom: BPM (http://www-03.ibm.com/software/products/sv/category/BPM-Software)
Cette présentation aborde plusieurs points :
* Qu'est-ce qu'un moteur de règles ?
* Drools, les alternatives et son historique.
* Résumé d'un comparatif de moteur de règles.
* Première règle, une règle simple !
* Règles lisibles pour un humain (DSL et Table de décision).
* Drools Guvnor (BRMS/BPMS, système de gestion de régles métiers).
* Drools Flow (Flow/WorkFlow).
* Drools Fusion (Event Processing).
* Performance :
o Algorithme de Rete
La présentation fut dense. En effet, le focus a été mis sur la dernière version de Drools, la version 5, qui propose énormément de fonctionnalités.
Le terme ‘Microservices’ fait le buzz depuis plusieurs mois déjà dans l’ingénierie logicielle. Durant cette soirée, Zenika vous propose de décrire en détail cette technique de décomposition de son système d’information.
La première partie de la soirée présente les enjeux des MicroServices et les différents cas d’utilisation.
La seconde partie aborde différents frameworks Java qui peuvent être utilisés pour la mise en place d’une architecture MicroServices.
Basho and Riak at GOTO Stockholm: "Don't Use My Database."Basho Technologies
What are common use cases for NoSQL? When should I avoid NoSQL? When is RDBMS just fine?
This presentation, delivered at the GOTO NoSQL Roadshow events in London and Stockholm in November of 2011 by Basho co-founder and COO, Antony Falco, take a no-BS look at the tradeoffs one must make to gain the advantages offered by distributed databases like Riak.
Keynote Gartner Business Process Management Summit, February 2009, London Wil van der Aalst
Executive Keynote Gartner Business Process Management Summit
23 – 25 February 2009, London. Title "Process Mining: Beyond Business Intelligence" by Prof. dr. ir. Wil van der Aalst, Professor of Information Systems, Technische Universiteit Eindhoven.
This is something completely NEW, something people said wasn’t possible, that the data wasn’t there to allow systems that really could map out a process; they were wrong. Data is now everywhere; it is accessible, there is an abundance of data and it can provide you with insights you could never find just in interviews. The goal is to get away from workflow systems that are divorced from reality and from how people really work.
Today’s tools oversimplify reality when what you need is a view as close to the real world as possible. Since the 1990s such process tools have been a disappointment; they haven’t covered the true lifecycle. Process mining is a new step which involves seeing how processes are really being executed and using this as an input to allow the design and improvement of processes.
Health Insurance Predictive Analysis with Hadoop and Machine Learning. JULIEN...Big Data Spain
Session presented at Big Data Spain 2012 Conference
16th Nov 2012
ETSI Telecomunicacion UPM Madrid
www.bigdataspain.org
More info: http://www.bigdataspain.org/es-2012/conference/health-insurance-predictive-analysis-with-hadoop-and-machine-learning/julien-cabot
Presentation for TENCompetence Winter School 2009 looking at principles for creating social software to support learning, using collective processes to take on some teacher roles.
The approaches to Artificial Intelligence (AI) in the last century may be labelled as (a) trying to understand and copy (human) nature, (b) being based on heuristic considerations, (c) being formal but from the outset (provably) limited, (d) being (mere) frameworks that leave crucial aspects unspecified. This decade has spawned the first theory of AI, which (e) is principled, formal, complete, and general. This theory, called Universal AI, is about ultimate super-intelligence. It can serve as a gold standard for General AI, and implicitly proposes a formal definition of machine intelligence. After a brief review of the various approaches to (general) AI, I will give an introduction to Universal AI, concentrating on the philosophical, mathematical, and computational aspects behind it. I will also discuss various implications and future challenges.
Bluffers guide to elitist jargon - Martijn Verburg, Richard Warburton, James ...JAX London
Have you always secretly wondered what the heck 'monads' are? How about 'Tail-call recursion?' or 'monomorphic dispatch'? If this sort of terminology has ever left you with self-doubts or seething with anger because someone is confusing you with elitist terminology, then this is the talk for you! Dr Richard Warburton and the Diabolical Developer + James Gough will take a humorous look at the wide range of incomprehensible terminology in our industry today. They'll cover the concepts behind the jargon with simple examples and some practical tips on how to blend the terminology into your day to day technical conversations without scaring everyone off. At the end of the talk you'll be ready to battle it out on tough mailing lists (Scala!) and have a new appreciation for some of the academic principles behind our craft. Oh and as for monads? Well they're just like burritos, except they're not...
The digital universe is booming, especially metadata and user-generated data. This raises strong challenges in order to identify the relevant portions of data which are relevant for a particular problem and to deal with the lifecycle of data. Finer grain problems include data evolution and the potential impact of change in the applications relying on the data, causing decay. The management of scientific data is especially sensitive to this. We present the Research Objects concept as the means to indentify and structure relevant data in scientific domains, addressing data as first-class citizens. We also identify and formally represent the main reasons for decay in this domain and propose methods and tools for their diagnosis and repair, based on provenance information. Finally, we discuss on the application of these concepts to the broader domain of the Web of Data: Data with a Purpose.
Reducing the Cost of the Linear Growth Effect using Adaptive Rules with Unlin...Mark Proctor
Presentation given at ODBase 2018 to support the submitted conference paper. It covers the enhancements to the Rete algorithm to provide lazy rule evaluation through rule linking, the solution is implemented and benchmarked in the Drools rule engine.
Drools, jBPM and OptaPlanner (NYC and DC Sept 2017 - Keynote Talk Video)Mark Proctor
A Keynote presentation given at two community days, once in NYC the other DC. It covers the history of how the projects grew over time, the agile practices used by those teams and also the project and product differences. It also highlights some key 7.x aspects, that were not shown in the later conference talks.
Learning Rule Based Programming using Games @DecisionCamp 2016Mark Proctor
Short talk, given at DecisionCamp 2016, on using games to learn rule based programming. Covers Number Guess, Wumpus World, Text Adventure and Invaders. Videos are embedded and linked from Youtube.
Red Hat JBoss BRMS and BPMS Workbench and Rich Client TechnologyMark Proctor
This is an overview video that shows the scope of work and technology used within the Red Hat JBoss BRMS and BPMS platforms.
The technology presented builds with GWT, Errai and UberFire as the foundation. Over 2015 we'll be working to make it for end users to consume the bits they need, paying for only what they use, so others can make power web platforms like BRMS and BPMS.
Games Development with Drools. Covers text adventure games, pong, wumpus and invaders. As well as a general rules introduction
Those games were also covered separately in other videos
Invaders : http://tinyurl.com/jwml42m
Wumpus : http://tinyurl.com/na376bu
Pong : http://tinyurl.com/pkgub9b
Text Adventure : http://tinyurl.com/mfggm8n
What's new in Drools 6 - London JBUG 2013Mark Proctor
Presentation around the time of Beta3 for "What's new in Drools 6.0". Note some aspects have already changed, especially around the spring integration.
Reactive Transitive Closures with Drools (Backward Chaining)Mark Proctor
Slides to go with the video here:
http://www.youtube.com/watch?v=fCjIRVSRFvA
This video shows backward chaining with Drools. It also demonstrates the concepts of reactive transitive closures.
UberFire is a tool to help rapidly build workbench or console applications. It's still in early beta stage, but this presentation gives a quick overview of what it provides, and how it woks. It shows a small video of the BRMS project being built with UberFire, as well as finishing with a simple web based IDE, that was built as an example application with UberFire
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
The Metaverse and AI: how can decision-makers harness the Metaverse for their...Jen Stirrup
The Metaverse is popularized in science fiction, and now it is becoming closer to being a part of our daily lives through the use of social media and shopping companies. How can businesses survive in a world where Artificial Intelligence is becoming the present as well as the future of technology, and how does the Metaverse fit into business strategy when futurist ideas are developing into reality at accelerated rates? How do we do this when our data isn't up to scratch? How can we move towards success with our data so we are set up for the Metaverse when it arrives?
How can you help your company evolve, adapt, and succeed using Artificial Intelligence and the Metaverse to stay ahead of the competition? What are the potential issues, complications, and benefits that these technologies could bring to us and our organizations? In this session, Jen Stirrup will explain how to start thinking about these technologies as an organisation.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™UiPathCommunity
In questo evento online gratuito, organizzato dalla Community Italiana di UiPath, potrai esplorare le nuove funzionalità di Autopilot, il tool che integra l'Intelligenza Artificiale nei processi di sviluppo e utilizzo delle Automazioni.
📕 Vedremo insieme alcuni esempi dell'utilizzo di Autopilot in diversi tool della Suite UiPath:
Autopilot per Studio Web
Autopilot per Studio
Autopilot per Apps
Clipboard AI
GenAI applicata alla Document Understanding
👨🏫👨💻 Speakers:
Stefano Negro, UiPath MVPx3, RPA Tech Lead @ BSP Consultant
Flavio Martinelli, UiPath MVP 2023, Technical Account Manager @UiPath
Andrei Tasca, RPA Solutions Team Lead @NTT Data
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
A tale of scale & speed: How the US Navy is enabling software delivery from l...
Drools @ IntelliFest 2012
1. 1
Mark
Proctor
Project Lead
●
The SkyNet funding bill is passed.
●
The system goes online on August 4th, 1997.
●
Human decisions are removed from strategic defense.
●
SkyNet begins to learn at a geometric rate.
●
It becomes self-aware at 2:14am Eastern time, August
29th
●
In a panic, they try to pull the plug.
●
And, Skynet fights back
3. 3
Sample Industries and Users
Investment
● Millennium Investment Group (MIG)
Logistics
● Fedex
Airline
● Sabre
Mortgage
● Franklin American
Healthcare
● OSDE
4. 4
Boot Camps
San Francisco 2009 (40+ attendees)
● Sponsored by Third Pillar
● Sun, FAMC, OSDE, Kaseya, Fedex, TU Group, Intermountain
Healthcare, Gap, Sony Pictures, Lockheed Martin, Kaiser, HP,
Wells Fargo, US Navy Research, FOLIOfn, Boeing .....
San Diego 2010 (80+ attendess)
● Sponsored by US Navy
● 5 day event, with 2 days focus on the healthcare industry
● OSDE, AT&T, SAIC, US Navy Research, Kaiser, Clinica,
Intermountain Healthcare, GE Healthcare, VA, Boeing,
Nationwide ....
7. 7
Rules and processes
generic
?
Decision
Services
SCOPE
Process
specific
Rules
tightly coupled COUPLING loosely coupled
8. 8
Some Areas of Artificial Intelligence
Vision
Robotics Natural
Some Areas of Language
Artificial
Speech Intelligence Understanding
Neural Nets Rule Base Systems/
Expert System Tools
9. 9
Knowledge Representation and Reasoning
The study of Knowledge is Epistemology
● Nature Structure and Origins of Knowledge
● Core or AI
Rule based systems
● Expert System tools
● Knowledge Representation and Reasoning
● Facilitate the codification of knowledge into a
knowledge base which can be used for reasoning
10. 10
Knowledege Representation and Reasoning
Production Rule Systems PRD (forward chaining)
● Reactive
● when Alarm( status == “alert” )
then send( “warning” )
Logic Programming LP (backward chaining)
● Query
● descendant( “mary”, “jane”)
Functional Programming FP
● Map,Fold, Filter
● avg([12, 16, 4, 6])
● Returns single value 9.5
● round([10.3, 4.7, 7.8] )
● Returns List [10, 5, 8]
Description Logic
11. 11
Knowledege Representation and Reasoning
Description Logic
● Man
● Father
● is a Man
● has at least one child
● All Fathers have sunday off
● Individual == instance
● Adhoc
● Classes and properties
added and inferred over time
● Does a Man with two children have sundays off?
12. 12
It All Started Here
Birth of CDSS
Dendral
1970s
Mycin
WM
Teiresias Emycin
Baobab
Puff
Guidon
Sacon
Centaur
Gravida
Wheeze Clot
1980s Neomycin Oncocin
17. 18
What is a Rule
salience <int>
Quotes on Rule names are
agenda-group <string>
optional if the rule name has
no-loop <boolean>
no spaces.
auto-focus <boolean>
duration <long>
....
• rule “<name>”
<attribute> <value>
when
<LHS>
then
<RHS> RHS can be any valid java.
Or MVEL. Other languages
end could be added.
18. 19
What is a Rule
Methods that must specific passing of
be called directly instances
• public void helloMark(Person person) {
Rules can never if ( person.getName().equals( “mark” ) {
be called directly System.out.println( “Hello Mark” );
} Specific instances
} cannot be passed.
• rule “Hello Mark” LHS
when
Person( name == “mark” )
then
System.out.println( “Hello Mark” );
end
RHS
19. 20
What is a Pattern
P a tte rn
O b je c t T y p e F ie ld C o n s t r a in t
F ie ld N a m e R e s t r ic t io n
E v a lu a t o r V a lu e
S h o w e r ( te m p e r a tu re = = “ h o t” )
20. 21
Classes
C a s h f lo w
A cco un t
D a te d a te
lo n g a c c o u n t N o
d o u b le a m o u n t
d o u b le b a la n c e
in t t y p e
lo n g a c c o u n t N o
A c c o u n t in g P e r io d
D a te s ta r t
D a te e n d
21. 22
Credit Cashflow Rule
select * from Account acc,
Cashflow cf, AccountPeriod ap
where acc.accountNo == cf.accountNo and
cf.type == CREDIT
cf.date >= ap.start and
cf.date <= ap.end
trigger : acc.balance += cf.amount
rule “increase balance for AccountPeriod Credits”
when
ap : AccountPeriod()
acc : Account( $accountNo : accountNo )
CashFlow( type == CREDIT,
accountNo == $accountNo,
date >= ap.start && <= ap.end,
$ammount : ammount )
then
acc.balance += $amount;
end
22. 23
Rules as a “view”
CashFlow AccountingPeriod
date amount type accountNo start end
12-Jan-07 100 CREDIT 1 01-Jan-07 31-Mar-07
2-Feb-07 200 DEBIT 1
18-May-07 50 CREDIT 1 Account
9-Mar-07 75 CREDIT 1 accountNo balance
1 0
rule “increase balance for AccountPeriod rule “decrease balance for AccountPeriod
Credits” Debits”
when when
ap : AccountPeriod() ap : AccountPeriod()
acc : Account( $accountNo : accountNo ) acc : Account( $accountNo : accountNo )
CashFlow( type == CREDIT, CashFlow( type == DEBIT,
accountNo == $accountNo, accountNo == $accountNo,
date >= ap.start && <= ap.end, date >= ap.start && <= ap.end,
$ammount : ammount ) $ammount : ammount )
then then
acc.balance += $amount; acc.balance -= $amount;
end CashFlow end CashFlow
date amount type date amount type
12-Jan-07 100 CREDIT 2-Feb-07 200 DEBIT
9-Mar-07 75 CREDIT
Account
accountNo balance
1 -25
23. 24
Production Rule System
Approximated by SQL and Views
T a b le s A cco unt A c c o u n t in g P e r io d C a s h f lo w
O b je c t T y p e s A cco unt A c c o u n t in g P e r io d C a s h f lo w
V ie w s v ie w 1 v ie w 2
V ie w
m a in v ie w R u le s r u le 1 r u le 2
agenda
agenda
24. 25
Two Phase System
Determine
possible rules to
fire
Agenda Evaluation
Working Memory Action
Rule
insert modify
Found Select
Fire Rule
Rule to Fire
retract
No Rule
Found
exit
25. 26
Conflict Resolution with Salience
Salience
rule “Print blance for AccountPeriod”
salience -50
when
ap : AccountPeriod()
acc : Account( )
then
System.out.println( acc.accountNo + “ : “ acc.balance );
end
Agenda
1 increase balance
2 decrease balance arbitrary
3 increase balance
4 print balance
26. 27
RuleFlow
rule “increase balance for AccountPeriod Credits”
ruleflow-group “calculation”
when
ap : AccountPeriod()
acc : Account( $accountNo : accountNo )
CashFlow( type == CREDIT,
accountNo == $accountNo,
date >= ap.start && <= ap.end,
$ammount : ammount )
then
acc.balance += $amount;
end
ruleflow-group
rule “Print blance for AccountPeriod”
ruleflow-group “report”
when
ap : AccountPeriod()
acc : Account( )
then
System.out.println( acc.accountNo + “ : “ acc.balance );
end
27. 28
Definitions
public class Applicant {
private String name;
private int age;
private boolean valid;
// getter and setter methods here
}
rule "Is of valid age" when
$a : Applicant( age < 18 )
then
modify( $a ) { valid = false };
ends
29. 30
Executing
rule "Is of valid age" when
$a : Applicant( age < 18 )
then
modify( $a ) { valid = false };
ends
StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession();
Applicant applicant = new Applicant( "Mr John Smith", 16 );
assertTrue( applicant.isValid() );
ksession.execute( applicant );
assertFalse( applicant.isValid() );
30. 31
Executing
rule "Is of valid age" when
$a : Applicant( age < 18 )
then
modify( $a ) { valid = false };
ends
StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession();
Applicant applicant = new Applicant( "Mr John Smith", 16 );
assertTrue( applicant.isValid() );
ksession.execute( applicant );
assertFalse( applicant.isValid() );
31. 32
Definitions
public class Room {
private String name
// getter and setter methods here
}
public class Sprinkler {
private Room room;
private boolean on;
// getter and setter methods here
}
public class Fire {
private Room room;
// getter and setter methods here
}
public class Alarm {
}
32. 33
Definitions
rule "When there is a fire turn on the sprinkler" when
Fire($room : room)
$sprinkler : Sprinkler( room == $room, on == false )
then
modify( $sprinkler ) { on = true };
println( "Turn on the sprinkler for room " + $room.name );
end
rule "When the fire is gone turn off the sprinkler" when
$room : Room( )
$sprinkler : Sprinkler( room == $room, on == true )
not Fire( room == $room )
then
modify( $sprinkler ) { on = false };
println( "Turn off the sprinkler for room " + $room.name );
end
33. 34
Definitions
rule "Raise the alarm when we have one or more fires" when
exists Fire()
then
insert( new Alarm() );
println( "Raise the alarm" );
end
rule "Cancel the alarm when all the fires have gone" when
not Fire()
$alarm : Alarm()
then
retract( $alarm );
println( "Cancel the alarm" );
end
34. 35
Definitions
rule "Status output when things are ok" when
not Alarm()
not Sprinkler( on == true )
then
println( "Everything is ok" );
end
35. 36
Executing
String[] names = new String[]{"kitchen", "bedroom", "office", "livingroom"};
Map<String,Room> name2room = new HashMap<String,Room>();
for( String name: names ){
Room room = new Room( name );
name2room.put( name, room );
ksession.insert( room );
Sprinkler sprinkler = new Sprinkler( room );
ksession.insert( sprinkler );
}
ksession.fireAllRules()
> Everything is ok
36. 37
Executing
Fire kitchenFire = new Fire( name2room.get( "kitchen" ) );
Fire officeFire = new Fire( name2room.get( "office" ) );
FactHandle kitchenFireHandle = ksession.insert( kitchenFire );
FactHandle officeFireHandle = ksession.insert( officeFire );
ksession.fireAllRules();
> Raise the alarm
> Turn on the sprinkler for room kitchen
> Turn on the sprinkler for room office
37. 38
Executing
ksession.retract( kitchenFireHandle );
ksession.retract( officeFireHandle );
ksession.fireAllRules()
> Turn off the sprinkler for room office
> Turn off the sprinkler for room kitchen
> Cancel the alarm
> Everything is ok
rule "Status output when things are ok" when
not Alarm()
not Sprinkler( on == true )
then
println( "Everything is ok" );
end
38. 39
Conditional Elements
not Bus( color = “red” )
exists Bus( color = “red” )
forall ( $bus : Bus( color == “red” ) )
forall ( $bus : Bus( floors == 2 )
Bus( this == $bus, color == “red” ) )
39. 40
Accumulate CE
rule "accumulate"
when
accumulate( Bus( color == "red", $t : takings );
$sum : sum( $t ) )
then
print "sum is “ + $sum;
end
accumulate( Bus( color == "red", $t : takings );
$sum : sum( $t ),
$min : min( $t )
$max : max( $t );
$min > 100 && $max < 200 )
40. 41
Timers
Field Name Mandatory? Allowed Values Allowed Special Characters
Seconds YES 0-59 ,-*/
Minutes YES 0-59 ,-*/
Hours YES 0-23 ,-*/
Day of month YES 1-31 ,-*?/LW
Month YES 1-12 or JAN-DEC ,-*/
Day of week YES 1-7 or SUN-SAT ,-*?/L#
Year NO empty, 1970-2099 ,-*/
Send alert every quarter of an hour
rule “name”
timer ( cron: 0 0/15 * * * * )
when
Alarm( )
then
sendEmail( ”Alert Alert Alert!!!” )
41. 42
Calendars
rule "weekdays are high priority"
calendars "weekday"
timer (int:0 1h) Execute now and after
1 hour duration
when
Alarm()
then
send( "priority high - we have an alarm” );
end
rule "weekend are low priority"
calendars "weekend"
timer (int:0 4h) Execute now and after
4 hour duration
when
Alarm()
then
send( "priority low - we have an alarm” );
end
42. 43
TMS and Inference
rule "Issue Child Bus Pass" Couples the logic
when
$p : Person( age < 16 )
then
insert(new ChildBusPass( $p ) );
end
rule "Issue Adult Bus Pass"
What happens when the Child
when stops being 16?
$p : Person( age >= 16 )
then
insert(new AdultBusPass( $p ) );
end
43. 44
TMS and Inference
Bad
● Monolithic
● Leaky
● Brittle integrity - manual maintenance
44. 45
TMS and Inference
A rule “logically” inserts an object
When the rule is no longer true, the object is retracted.
when
$p : Person( age < 16 ) de-couples the logic
then
logicalInsert( new IsChild( $p ) )
end
when
Maintains the truth by
$p : Person( age >= 16 ) automatically retracting
then
logicalInsert( new IsAdult( $p ) )
end
45. 46
TMS and Inference
rule "Issue Child Bus Pass"
when
$p : Person( )
IsChild( person =$p )
then
logicalInsert(new ChildBusPass( $p ) );
end
rule "Issue Adult Bus Pass"
The truth maintenance cascades
when
$p : Person()
IsAdult( person =$p )
then
logicalInsert(new AdultBusPass( $p ) );
end
46. 47
TMS and Inference
rule "Issue Child Bus Pass"
when
$p : Person( )
not( ChildBusPass( person == $p ) )
then
requestChildBusPass( $p );
end The truth maintenance cascades
47. 48
TMS and Inference
Good
● De-couple knowledge responsibilities
● Encapsulate knowledge
● Provide semantic abstractions for those encapsulation
● Integrity robustness – truth maintenance
48. 49
Backward Chaining
query isChild( Person p )
$p := Person( age <= 16 )
end
rule "Issue Child Bus Pass"
when
$p : Person( )
isChild( $p; )
then
logicalInsert(new ChildBusPass( $p ) );
end
52. 53
Questions?
• Dave Bowman: All right, HAL; I'll go in
through the emergency airlock.
• HAL: Without your space helmet, Dave,
you're going to find that rather difficult.
• Dave Bowman: HAL, I won't argue with
you anymore! Open the doors!
• HAL: Dave, this conversation can serve
no purpose anymore. Goodbye.
Joshua: Greetings, Professor Falken.
Stephen Falken: Hello, Joshua.
Joshua: A strange game. The only
winning move is not to play. How
about a nice game of chess?