Use C# And WPF To Create Artificial Intelligence System

Introduction

It is my goal in the following article, to trace out, in as short a compass as I can, how you can use C# WPF applications to create a low-level Artificial Intelligence system.
 
In the terminology that I am using for this article, a high-level Artificial Intelligence system can solve problems for you, but a low-level one requires that you still do some of the work yourself manually.
 
Both a low-level and a high-level AI system contain a knowledge base. Each item in the knowledge base “connects” something that humans understand to something that the computer understands. We can think of a knowledge base as being a dictionary of key-value pairs, where the “key” is the part that humans understand and the “value” part is the component that the computer understands.
 
When a high-level AI system is presented with a problem, it starts out by comparing the actual state of the situation to the ideal one. This comparison reveals a number of differences between the two situations. The AI system searches its knowledge base to see if it knows what actions can be used to remove each of those differences. This problem-solving process is analogous to what Google does to find the shortest distance between point A and point B on a map.  In this analogy, we can think of the problem statement as being like our current location and the ideal state as being like the destination. The items in the knowledge base can be thought of as being various “roads” that lie between our current location and the destination. A high-level AI system can automatically determine the best way to remove the differences between the actual and the ideal while a low-level AI system requires that we manually perform this task.
 
IdealAutomate is a tool that can help us to manually perform the steps.
 
Ideal Automate is an open-source development platform that allows developers to automate any repetitive task with C# WPF applications. When you are automating a lot of individual tasks with C# WPF applications, the process of finding what you have automated and launching each application can become enormous.
 
The main component of IdealAutomate is called IdealAutomateExplorer, and it can be used to simplify the process of finding what you have automated and launching it. Instead of automatically translating differences into actions like a high-level AI system would, IdealAutomateExplorer just provides you with an easy way to manually organize your knowledge.
 
Here is a screenshot of IdealAutomateExplorer in list view,
 
C#
 
I think of IdealAutomateExplorer as being like Windows File Explorer on steroids. Windows File Explorer provides an excellent way to organize folders and files, but it is not all that great at organizing information in a knowledge base. This is where IdealAutomateExplorer comes into play. As you discover different things that you repetitively do, you can automate that task with a little C# WPF application, and put it in your knowledge base in IdealAutomateExplorer. Then, when you are faced with a problem, you can manually break that problem down into its component parts and manually search your knowledge base in IdealAutomateExplorer to see if there is anything you have already automated that can help you in solving your problem. If you have automated something, IdealAutomateExplorer makes it much easier for you to execute what you have automated by using hotkeys, etc.
 
Although IdealAutomateExplorer is similar to Windows File Explorer, it has a number of extra built-in features. Here is a quick list of five of those extra built-in features:
  1. IdealAutomateExplorer has multiple tabs so that you do not have to open multiple instances of the application to browse different folders. You can think of each tab as being like a separate instance of File Explorer. Another advantage of having multiple tabs is that you can close down the application and reopen it later without losing where you were when you closed the application.
     
    C#
  2. IdealAutomateExplorer also has a details window that immediately shows you the content of a file without you having to leave the application.
     
    C#
  1. If you right-click on any file or folder in IdealAutomateExplorer, you will get a context menu. This context menu allows you to do such things as add hotkeys and metadata to files. The context menu also gives you the ability to run applications and open applications from the folder level without having to drill down to the individual .exe or .sln file.
     
    C#
  1. Another built-in feature of IdealAutomateExplorer is that it allows you to add Categories and Subcategories to your file structure. Categories and Subcategories differ from folders in that they allow you to persist whether a folder is expanded or closed once you leave the window and return later.
     
    C#
     
  2. A final feature that makes IdealAutomateExplorer very powerful is the built-in parallel search utility which allows you to quickly find a string or regular expression in any of the files within a folder.
     
    C#
IdealAutomateExplorer is the tool to use to organize and easily launch automated tasks. To easily get started using this tool today, you can install the application in a single click by clicking Install IdealAutomateExplorer Exe App without Source.
 
However, if you want to actually start writing your own C# WPF applications to automate tasks, the source code on Github for IdealAutomate can help you do that.
 
When you download that source code, you will find many projects and solutions. One of the solutions contains the source code for IdealAutomateExplorer. If you did not install the application without the source code, you can just navigate to the executable in the bin folder for the IdealAutomateExplorer solution and launch it from there.
 
The other solutions that were downloaded with the source code provide various examples of the types of things that you can automate with IdealAutomate.  If you open a new tab in IdealAutomateExplorer and navigate to the folder where you unzipped the source code for all of the solutions, you will easily be able to run the various examples by right-clicking on the folder for an example and selecting run.
 
If you want to write your own C# WPF applications to automate tasks, you need to build a solution called IdealAutomateCore first. The main library for Ideal Automate that contains all the methods to help you automate tasks is called IdealAutomateCore.dll. The Build Properties for IdealAutomateCore solution specifies that the dll should be copied to your roaming folder. Once you have built the IdealAutomateCore solution, you can start writing your C# WPF applications.
 
You can create the C# WPF applications manually in Visual Studio by creating a new project and adding a reference to the IdealAutomateCore.dll in your roaming folder. However, it is easier to use IdealAutomateExplorer to create the project for you in a single click by using the File/New Project menu item.
 
Once you create the C# WPF application, you can right-click on the folder for the solution in IdealAutomateExplorer and select open with Visual Studio.  This will open the application in Visual Studio. If you open the file MainWindow.xaml.cs in Visual Studio, you will see some sample code for automating creating a tutorial. You can run the code in debug mode to see how it works. This should help you to get started in automating tasks on your computer and also provide you with an easy way to find them later and execute them. You can examine some of the other examples provided in the source code to learn more about how to automate various tasks. There are several videos included in the help section of IdealAutomateExplorer that you can view to help you learn more about the types of things that can be automated.
 
The real power of Ideal Automate is that it allows one to automate almost any task. It does this by allowing you to write scripts that can find images on the screen. By finding an image on the screen, you are able to locate where you want to read or write something, regardless of which application the image resides within. The fact that you can read and write to virtually any location makes it possible to create a degree of artificial intelligence where the script is able to perform real-time, problem-solving activities. For example, the script can read a piece of information, interpret what it has read, and then make decisions in real-time about what to do based on that interpretation.