How does rule-based verification with Petri nets work and what is this good for? - rules

A friend just pointed me out to an new development in computer science called "rule based verification with Petri nets". He's not a computer guy but an artist, so I wonder if that's really something cool I must look at? Over the phone he told me from reading and translating an newspaper in Russian, that this fancy new technology is all about automatically getting code architectures of rule based systems perfectly right. A kind of artifical intelligence helping us to code perfectly? Ok, I really don't know, haven't studied computer science.
I'm curious: What exactly is this all about? And how does it work? Can I use it for my framework?
I guess a "rule based system" is almost everything: All our code has rules. Hope for some useful answers.

Petri nets are just a fancy way to express a state space and the transitions between the states. They are Turing-complete, though, so everything that applies to Turing machines is true for Petri nets, too.
They are in no way an artificial intelligence. In my oppinion, the must useful application for petri nets is as an abstract modelling tool for simulation purposes.
Edit: Some examples for this might be the simulation of packets in a computer network or how automats will behave. If you are still interested, here is a link to Computer Simulation class that teaches Petri Nets with some random behaviour: http://www.sim-md.de/its/Lectures/09-PetriNets.pdf
Edit 2: Disregard the upper link, it is no longer working.

Related

Prerequisite for SICP

I have been programming in a "learn-by-doing" fashion for almost 2 years now and I consider myself fairly good however, I really wish to build a good foundation of Computer Science/Computer Engineering and most people recommend I start off with SICP. (Structure and Interpretation of Computer Programs)
I wished to know
Is this the best way to go about it?
I know how to code a matrix-multiplication in OpenMP and MPI and I know college level math, is this sufficient to read and appreciate SICP?
Instead of this, can I just spend all my time working on Project Euler instead?
A personal experience: Like you I am trying to learn programming by self-study and I started off with SICP. As I am a ancient historian and archaeologist, I have no background in maths, engineering or real computer science (just good knowlegde in stuff like LaTeX, HTML and CSS). My last lessons in math are now 15 years ago. Although I am working through SICP with a math book at my side the explanations given in SICP are really sufficient to understand the stuff. I really appreciate SICP, it is demanding, but great fun. I also would recommend to buy it as a book, I prefer that from reading on screen.
Sometimes you have to cope with some difficulties because language standards have changed (eg. Running SICP Pattern Matching Rule Based Substitution Code) or the authors assume existing functions which are just defined later in the book (eg. How do I get the functions put and get in SICP, Scheme, Exercise 2.78 and on). As a you always will find solutions or hints on the web this is nothing which should bother you.
If you know any amount of programming you'll likely be better off for it, but it's by no means a requirement when going through the SICP. I'm going through it right now (cover to cover style), and I'm up too section 2.3.3. The biggest road block for me has been how maths based some of the problems can be, as it's been a while since I did maths back in high school. For these problems I've resorted to googling an explanation of the problem and solution. Like programming, maths isn't a requirement either, obviously because I'm still making progress through the book, but I feel it could help at times.
The only requirement you'll honestly need, is a computer and a scheme implementation, I'd recommend MIT scheme or DrRacket.
TL;DR
The only requirement you'll need is a computer, and a scheme implementation, everything else can be learned as you go along.

Robotics Club Programming Portion

My school has entered into a Robotics Tournament that competes several schools against each other(this is my school's first year). The objective of the robot is to shoot a ball into a hoop. I am a member of the Programming team. Our job as the programmers is to program a robot and a computer to control the robot. The computer has 2 joy sticks attached to it, one for moving the entire robot(spinning the wheels and causing the robot to move) and one is for the "throwing arm". A signal is going to be sent from the computer to the robot using wifi. All of the programming MUST be done in LabView.
I have never heard of LabView before until i joined this club and i have my doubts about it. The reason why we must use LabView is because most of the kids on the programming team have no programming experience whatsoever. LabView has to be able to interface with the joy sticks and then send that information to the robot using wifi. The micro controller on the robot supports LabView.
Now to my question, is LabView dynamic enough to preform this task? Can LabView even support networking? Can LabView even interface with the joy sticks? I have read a lot of the documentation for LabView from this website:
http://www.ni.com/gettingstarted/labviewbasics/environment.htm
My concern is that LabView is not dynamic enough for what we are trying to use it for as a team and we are going to have to program the computer and the micro controller using C. There are only 2 people on the team who can program sufficiently in C so we would have to teach the rest of the members the basics of C.
All relevant answers are welcomed and appreciated.
LabVIEW can totally do this. I am biased: I've written a textbook on it and am teaching classes:-); I also do this for a living. In comparision to C, well, C can do anything, but LabVIEW does hardware on a much higher level. Doesn't mean I don't like bending pointers for a bit; but it's nice to not care about low-level functions for a while.
Interfacing a joystick is pretty simple, it looks like this: http://digital.ni.com/public.nsf/allkb/CA411647F224787B86256DD000669EFE
To interface Wifi, it depends on how the robot should receive the information. TCP/IP would go like this: http://zone.ni.com/devzone/cda/tut/p/id/2710
I'm not sure what you mean by "dynamic enough", but it's certainly possible to create such a system in LabVIEW, and if the users have no experience, they're probably more likely to succeed if they use LV and they're probably going to enjoy it more. There are certainly many groups who use LabVIEW.
There are people who volunteer as mentors for FRC groups, so I would suggest you ask FIRST or your local NI office if they know of anyone (whether C or LV) who can help your group. If you ask NI, they might also be able to help you in other ways.
There's also a similar discussion here - Textual versus Graphical Programming Languages
The web page you provided is very introductory, "Hello world!" like. Just by learning that you can not get an idea about the LabVIEW potential. Sure you can do everithing with C, but with LabVIEW you will make the same task faster and I don't think you will need more than 2 team members working on the program.
LabView is dynamic, especially for the purposes of robotics club. A white paper outlines some of the possibilities. http://www.ni.com/white-paper/14133/en/
A great resource for people participating in robotics club is the Raspberry Pi website and blog. It is an excellent site to discover what others are doing and creating.
Consider studying the potential of robotics arms and reading white papers from companies that develop them for purposes such as laboratory automation. This is information that could help you if you decide to do this as a career. http://www.hudsonrobotics.com/products/microplate-handling/

How to make the application intelligent to grade answers?

I am adding a feature to an application in which the students answer questions that are more descriptive in nature. I am curious to know if there's a way to make the system "smart" enough to grade these answers. Ofcourse, I can run the answers through a set of keywords to ensure that the student has atleast included the keywords in the answers, but obviously this is not smart enough.
I know there's no fool proof way of grading descriptive answers, but was wondering if there's any technologies out there that I can look into.
You could use mechanical turk which is an API for humans. Which is probably as far as you can get with AI'ing your system. Understanding and grading actual text is one of the last remaining problems where humans are way better than computers (i.e. computers suck)
One notable exception is Watson which is actually really good at Jeopardy, but it runs on a huge computing cluster and includes some serious optimizations and smarts. That's nothing you just turn on. Sorry...
The answer is not so simple. There are "automated grading systems" out there, used, I believe, for example, to grade GRE exams. For example, see this paper and this by ETS.

How To: Pattern Recognition

I'm interested in learning more about pattern recognition. I know that's somewhat of a broad field, so I'll list some specific types of problems I would like to learn to deal with:
Finding patterns in a seemingly random set of bytes.
Recognizing known shapes (such as circles and squares) in images.
Noticing movement patterns given a stream of positions (Vector3)
This is a new area of experimentation for me personally, and to be honest, I simply don't know where to start :-) I'm obviously not looking for the answers to be provided to me on a silver platter, but some search terms and/or online resources where I can start to acquaint myself with the concepts of the above problem domains would be awesome.
Thanks!
ps: For extra credit, if said resources provide code examples/discussion in C# would be grand :-) but doesn't need to be
Hidden Markov Models are a great place to look, as well as Artificial Neural Networks.
Edit: You could take a look at NeuronDotNet, it's open source and you could poke around the code.
Edit 2: You can also take a look at ITK, it's also open source and implements a lot of these types of algorithms.
Edit 3: Here's a pretty good intro to neural nets. It covers a lot of the basics and includes source code (albeit in C++). He implemented an unsupervised learning algorithm, I think you may be looking for a supervised backpropagation algorithm to train your network.
Edit 4: Another good intro, avoids really heavy math, but provides references to a lot of that detail at the bottom, if you want to dig into it. Includes pseudo-code, good diagrams, and a lengthy description of backpropagation.
This is kind of like saying "I'd like to learn more about electronics.. anyone tell me where to start?" Pattern Recognition is a whole field - there are hundreds, if not thousands of books out there, and any university has at least several (probably 10 or more) courses at the grad level on this. There are numerous journals dedicated to this as well, that have been publishing for decades ... conferences ..
You might start with the wikipedia.
http://en.wikipedia.org/wiki/Pattern_recognition
This is kind of an old question, but it's relevant so I figured I'd post it here :-) Stanford began offering an online Machine Learning class here - http://www.ml-class.org
OpenCV has some functions for pattern recognition in images.
You might want to look at this :http://opencv.willowgarage.com/documentation/pattern_recognition.html. (broken link: closest thing in the new doc is http://opencv.willowgarage.com/documentation/cpp/ml__machine_learning.html, although it is no longer what I'd call helpful documentation for a beginner - see other answers)
However, I also recommend starting with Matlab because openCV is not intuitive to use.
Lot of useful links on this page on computer vision related pattern recognition. Some of the links seem to be broken now but you may find it useful.
I am not an expert on this, but reading about Hidden Markov Models is a good way to start.
Beware false patterns! For any decently large data set you will find subsets that appear to have pattern, even if it is a data set of coin flips. No good process for pattern recognition should be without statistical techniques to assess confidence that the detected patterns are real. When possible, run your algorithms on random data to see what patterns they detect. These experiments will give you a baseline for the strength of a pattern that can be found in random (a.k.a "null") data. This kind of technique can help you assess the "false discovery rate" for your findings.
learning pattern-recoginition is easier in matlab..
there are several examples and there are functions to use.
it is good for the understanding concepts and experiments...
I would recommend starting with some MATLAB toolbox. MATLAB is an especially convenient place to start playing around with stuff like this due to its interactive console. A nice toolbox I personally used and really liked is PRTools (http://prtools.org); they have an implementation of pretty much every pattern recognition tool and also some other machine learning tools (Neural Networks, etc.). But the nice thing about MATLAB is that there are many other toolboxes as well you can try out (there is even a proprietary toolbox from Mathworks)
Whenever you feel comfortable enough with the different tools (and found out which classifier is perfomring best for you problem), you can start thinking about implementing the machine learning in a different application.

What are some good computer science resources for a blind programmer?

I'm a totally blind individual who would like to learn more of the theory aspect of computer science. I've had an intro data structures class and the general intro programming but would like to learn more on things such as software design, advanced data structures, and compiler design. I want to do this as a self study course not as part of college classes.
Unfortunately there aren’t many text books available on computer science from Recordings for the Blind and Dyslexic where I normally get my textbooks. I would appreciate any electronic resources preferably free that could help me get more of a computer science education rather then the newest language or platform that a lot of programming sites appear to focus on.
You might find the Experiences of a Blind Computer Scientist a good read.
MIT's Open Courseware would be a good resource for you with the amount of videos/audio they have.
Really though, for the core computer-science topics I find it pretty hard to beat some of the better textbooks out there. Some offer digital versions of their book with purchase and some don't. For those that don't, I would just purchase the book and then download via a torrent site a digital e-book equivelant. Since you already own the book I don't think this would be a major problem.
UC Berkley has a couple of computer science courses online for free as mp3 and video files (including RSS feed for each course). And if reading PDF files aren't an issue you could check out O'Reilly's Safari.
The text book for Structure and Interpretation of Computer Programs appears to be accessible. Software engineering radio is a good podcast that I listen to but recently has focused a lot on model driven development and UML which doesn't interest me. The UC Berkley
lectures are of varying quality, it's like all other college classes it depends on the professor. I've found I can follow along with the cs162 lectures fine but not so much with the cs61b. Part of this is because of the professor and part is probably because 61b is more math heavy since it's a data structures class. Unfortunately the RSS feeds are useless since the file names are meaningless. I used my podcatcher to download the entire lecture series, then used the converting capability of foobar 2000 to rename the files with there track number so I could listen to them in order. I've used Safari at work before and it is accessible although to expensive for me to get a yearly subscription. Open Courseware appears to have a lot of good stuff. Unfortunately I don't use itunes so instead of downloading each mp3 file individually I used the firefox extension DownThemAll! with a custom filter to grab all the mp3 files at once from the specific course I wanted. Another series of books that looks useful are the data structures books by Bruno R. Preiss several of which are available online at
http://www.brpreiss.com/books/opus5/
Some of the equations are represented as graphics but I can often tell what the general idea is by context.
I wonder would the Structure and Interpretation of Computer Programs video lectures by Hal Abelson and Gerald Jay Sussman be of any use?
If the audio content is enough on its own without the video, they are an excellent digital resource.
The podcast "software engineering radio" is excellent. Though not CS courseware, it is the most academic and intellectually stimulating podcast I have found about software development and computer science.
http://www.se-radio.net/
personally I am just blown away by the questioner. I mean, the challenge alone of programming is too much for most people but being without the primary sense used in the task is amazing to me. What is ironic though is I bet that given this challenge the questioner is still FAR more adept at most CS tasks than the people I work with day to day. Just saying.
I'm also a totally blind programmer, currently working for Microsoft. The most valuable resource for te technical books is Safari (safari.oreilly.com). You can read thousands of computer science texts there. if you're in the USA, you can also get many of those titles for free from BookShare (www.bookshare.org). In both cases graphical images will be an issue, but there's no easy solution for that. Most good books have enough descriptive text that one can manage without the diagrams.
I to am a new blind programmer! I only lost my vision 5 years ago. Anyway, I have been programming in Visual Basic 2008 throughout the past year. It turned out to be more accessible than I had at first suspected.
I start a Java class next semester and the required text is a free online text! It is posted below.
Introduction to Programming Using Java, Fifth Edition
http://math.hws.edu/javanotes/
Can some of you seasoned blind programmers share with us any blogs or websites where other blind programmers can be found??
Check out this Stack Overflow question about podcasts.
A language called Quorum is a lot like Python but optimized across a few more syntactic details, and the corresponding development environment is designed with the blind in mind. https://quorumlanguage.com/ This might fit especially well with the use case where most students are using Python.
A 2016 blog about CSed (actually a response to a blog post) points to
program-l discussion board for blind programmers at https://www.freelists.org/list/program-l
The EPIQ conference for blind and other programmers interested in Quorum
https://quorumlanguage.com/epiq.html
Also, see other ideas in a similar question on another SO site: https://cseducators.stackexchange.com/questions/3441/teaching-a-blind-high-school-student

Resources