Tag Archives: character

#431392 What AI Can Now Do Is Remarkable—But ...

Major websites all over the world use a system called CAPTCHA to verify that someone is indeed a human and not a bot when entering data or signing into an account. CAPTCHA stands for the “Completely Automated Public Turing test to tell Computers and Humans Apart.” The squiggly letters and numbers, often posted against photographs or textured backgrounds, have been a good way to foil hackers. They are annoying but effective.
The days of CAPTCHA as a viable line of defense may, however, be numbered.
Researchers at Vicarious, a Californian artificial intelligence firm funded by Amazon founder Jeff Bezos and Facebook’s Mark Zuckerberg, have just published a paper documenting how they were able to defeat CAPTCHA using new artificial intelligence techniques. Whereas today’s most advanced artificial intelligence (AI) technologies use neural networks that require massive amounts of data to learn from, sometimes millions of examples, the researchers said their system needed just five training steps to crack Google’s reCAPTCHA technology. With this, they achieved a 67 percent success rate per character—reasonably close to the human accuracy rate of 87 percent. In answering PayPal and Yahoo CAPTCHAs, the system achieved an accuracy rate of greater than 50 percent.
The CAPTCHA breakthrough came hard on the heels of another major milestone from Google’s DeepMind team, the people who built the world’s best Go-playing system. DeepMind built a new artificial-intelligence system called AlphaGo Zero that taught itself to play the game at a world-beating level with minimal training data, mainly using trial and error—in a fashion similar to how humans learn.
Both playing Go and deciphering CAPTCHAs are clear examples of what we call narrow AI, which is different from artificial general intelligence (AGI)—the stuff of science fiction. Remember R2-D2 of Star Wars, Ava from Ex Machina, and Samantha from Her? They could do many things and learned everything they needed on their own.
Narrow AI technologies are systems that can only perform one specific type of task. For example, if you asked AlphaGo Zero to learn to play Monopoly, it could not, even though that is a far less sophisticated game than Go. If you asked the CAPTCHA cracker to learn to understand a spoken phrase, it would not even know where to start.
To date, though, even narrow AI has been difficult to build and perfect. To perform very elementary tasks such as determining whether an image is of a cat or a dog, the system requires the development of a model that details exactly what is being analyzed and massive amounts of data with labeled examples of both. The examples are used to train the AI systems, which are modeled on the neural networks in the brain, in which the connections between layers of neurons are adjusted based on what is observed. To put it simply, you tell an AI system exactly what to learn, and the more data you give it, the more accurate it becomes.
The methods that Vicarious and Google used were different; they allowed the systems to learn on their own, albeit in a narrow field. By making their own assumptions about what the training model should be and trying different permutations until they got the right results, they were able to teach themselves how to read the letters in a CAPTCHA or to play a game.
This blurs the line between narrow AI and AGI and has broader implications in robotics and virtually any other field in which machine learning in complex environments may be relevant.
Beyond visual recognition, the Vicarious breakthrough and AlphaGo Zero success are encouraging scientists to think about how AIs can learn to do things from scratch. And this brings us one step closer to coexisting with classes of AIs and robots that can learn to perform new tasks that are slight variants on their previous tasks—and ultimately the AGI of science fiction.
So R2-D2 may be here sooner than we expected.
This article was originally published by The Washington Post. Read the original article here.
Image Credit: Zapp2Photo / Shutterstock.com Continue reading

Posted in Human Robots | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

#431058 How to Make Your First Chatbot With the ...

You’re probably wondering what Game of Thrones has to do with chatbots and artificial intelligence. Before I explain this weird connection, I need to warn you that this article may contain some serious spoilers. Continue with your reading only if you are a passionate GoT follower, who watches new episodes immediately after they come out.
Why are chatbots so important anyway?
According to the study “When Will AI Exceed Human Performance?,” researchers believe there is a 50% chance artificial intelligence could take over all human jobs by around the year 2060. This technology has already replaced dozens of customer service and sales positions and helped businesses make substantial savings.
Apart from the obvious business advantages, chatbot creation can be fun. You can create an artificial personality with a strong attitude and a unique set of traits and flaws. It’s like creating a new character for your favorite TV show. That’s why I decided to explain the most important elements of the chatbot creation process by using the TV characters we all know and love (or hate).
Why Game of Thrones?
Game of Thrones is the most popular TV show in the world. More than 10 million viewers watched the seventh season premiere, and you have probably seen internet users fanatically discussing the series’ characters, storyline, and possible endings.
Apart from writing about chatbots, I’m also a GoT fanatic, and I will base this chatbot on one of the characters from my favorite series. But before you find out the name of my bot, you should read a few lines about incredible free tools that allow us to build chatbots without coding.
Are chatbots expensive?
Today, you can create a chatbot even if you don’t know how to code. Most chatbot building platforms offer at least one free plan that allows you to use basic functionalities, create your bot, deploy it to Facebook Messenger, and analyze its performance. Free plans usually allow your bot to talk to a limited number of users.
Why should you personalize your bot?
Every platform will ask you to write a bot’s name before you start designing conversations. You will also be able to add the bot’s photograph and bio. Personalizing your bot is the only way to ensure that you will stick to the same personality and storyline throughout the building process. Users often see chatbots as people, and by giving your bot an identity, you will make sure that it doesn’t sound like it has multiple personality disorder.
I think connecting my chatbot with a GoT character will help readers understand the process of chatbot creation.
And the name of our GoT chatbot is…
…Cersei. She is mean, pragmatic, and fearless and she would do anything to stay on the Iron Throne. Many people would rather hang out with Daenerys or Jon Snow. These characters are honest, noble and good-hearted, which means their actions are often predictable.
Cersei, on the other hand, is the queen of intrigues. As the meanest and the most vengeful character in the series, she has an evil plan for everybody who steps on her toes. While viewers can easily guess where Jon and Daenerys stand, there are dozens of questions they would like to ask Cersei. But before we start talking to our bot, we need to build her personality by using the most basic elements of chatbot interaction.
Choosing the bot’s name on Botsify.
Welcome / Greeting Message
The welcome message is the greeting Cersei says to every commoner who clicks on the ‘start conversation’ button. She is not a welcoming person (ask Sansa), except if you are a banker from Braavos. Her introductory message may sound something like this:
“Dear {{user_full_name}}, My name is Cersei of the House Lannister, the First of Her Name, Queen of the Andals and the First Men, Protector of the Seven Kingdoms. You can ask me questions, and I will answer them. If the question is not worth answering, I will redirect you to Ser Gregor Clegane, who will give you a step-by-step course on how to talk to the Queen of Westeros.”
Creating the welcome message on Chatfuel
Default Message / Answer
In the bot game, users, bots, and their creators often need to learn from failed attempts and mistakes. The default message is the text Cersei will send whenever you ask her a question she doesn’t understand. Knowing Cersei, it would sound something like this:
“Ser Gregor, please escort {{user_full_name}} to the dungeon.”
Creating default message on Botsify
Menu
To avoid calling out the Mountain every time someone asks her a question, Cersei might give you a few (safe) options to choose. The best way to do this is by using a menu function. We can classify the questions people want to ask Cersei in several different categories:

Iron Throne
Relationship with Jaime — OK, this isn’t a “safe option,” get ready to get close and personal with Sir Gregor Clegane.
War plans
Euron Greyjoy

After users choose a menu item, Cersei can give them a default response on the topic or set up a plot that will make their lives miserable. Knowing Cersei, she will probably go for the second option.
Adding chatbot menu on Botsify
Stories / Blocks
This feature allows us to build a longer Cersei-to-user interaction. The structure of stories and blocks is different on every chatbot platform, but most of them use keywords and phrases for finding out the user’s intention.

Keywords — where the bot recognizes a certain keyword within the user’s reply. Users who have chosen the ‘war plans’ option might ask Cersei how is she planning to defeat Daenerys’s dragons. We can add ‘dragon’ and ‘dragons’ as keywords, and connect them with an answer that will sound something like this:

“Dragons are not invulnerable as you may think. Maester Qyburn is developing a weapon that will bring them down for good!”
Adding keywords on Chatfuel
People may also ask her about White Walkers. Do you plan to join Daenerys and Jon Snow in a fight against White Walkers? After we add ‘White Walker’ and ‘White Walkers’ on the keyword list, Cersei will answer:
“White Walkers? Do you think the Queen of Westeros has enough free time to think about creatures from fairy tales and legends?”
Adding Keywords on Botsify

Phrases — are more complex syntaxes that the bot can be trained to recognize. Many people would like to ask Cersei if she’s going to marry Euron Greyjoy after the war ends. We can add ‘Euron’ as a keyword, but then we won’t be sure what answer the user is expecting. Instead, we can use the phrase ‘(Will you) marry Euron Greyjoy (after the war?)’. Just to be sure, we should also add a few alternative phrases like ‘(Do you plan on) marrying Euron Greyjoy (after the war),’ ‘(Will you) end up with Euron Greyjoy (after the war?)’, ‘(Will) Euron Greyjoy be the new King?’ etc. Cersei would probably answer this inquiry in her style:

“Of course not, Euron is a useful idiot. I will use his fleet and send him back to the Iron Islands, where he belongs.”
Adding phrases on Botsify
Forms
We have already asked Cersei several questions, and now she would like to ask us something. She can do so by using the form/user input feature. Most tools allow us to add a question and the criteria for checking the users’ answer. If the user provides us the answer that is compliant to the predefined form (like email address, phone number, or a ZIP code), the bot will identify and extract the answer. If the answer doesn’t fit into the predefined criteria, the bot will notify the user and ask him/her to try again.
If Cersei would ask you a question, she would probably want to know your address so she could send her guards to fill your basement with barrels of wildfire.
Creating forms on Botsify
Templates
If you have problems building your first chatbot, templates can help you create the basic conversation structure. Unfortunately, not all platforms offer this feature for free. Snatchbot currently has the most comprehensive list of free templates. There you can choose a pre-built layout. The template selection ranges from simple FAQ bots to ones created for a specific industry, like banking, airline, healthcare, or e-commerce.
Choosing templates on Snatchbot
Plugins
Most tools also provide plugins that can be used for making the conversations more meaningful. These plugins allow Cersei to send images, audio and video files. She can unleash her creativity and make you suffer by sending you her favorite GoT execution videos.

With the help of integrations, Cersei can talk to you on Facebook Messenger, Telegram, WeChat, Slack, and many other communication apps. She can also sell her fan gear and ask you for donations by integrating in-bot payments from PayPal accounts. Her sales pitch will probably sound something like this:
“Gold wins wars! Would you rather invest your funds in a member of a respected family, who always pays her debts, or in the chaotic war endeavor of a crazy revolutionary, whose strength lies in three flying lizards? If your pockets are full of gold, you are already on my side. Now you can complete your checkout on PayPal.”
Chatbot building is now easier than ever, and even small businesses are starting to use the incredible benefits of artificial intelligence. If you still don’t believe that chatbots can replace customer service representatives, I suggest you try to develop a bot based on your favorite TV show, movie or book character and talk with him/her for a while. This way, you will be able to understand the concept that stands behind this amazing technology and use it to improve your business.
Now I’m off to talk to Cersei. Maybe she will feed me some Season 8 spoilers.
This article was originally published by Chatbots Magazine. Read the original post here.
Image credits for screenshots in post: Branislav Srdanovic
Banner stock media provided by new_vision_studio / Pond5 Continue reading

Posted in Human Robots | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

#426831 Industrial robot runtime programming

Article provided by: www.robotct.ru
In this article, runtime programming is understood as the process of creating an executable program for a robot controller (hereinafter referred to as “robot”) on an external controller. In this case the robot performs the program iteratively, by sending the minimum executable command or batch of commands to it. In other words, in runtime programming, the executable program is sent to the robot in portions, thus the robot does not have, store, or know the entire executable program beforehand. Such an approach allows creating an abstract parameterized executable program, which is generated by the external device “on the fly”, i.e., during runtime.
Under the cut, there is the description and a real example of how runtime programming works.
Typically, a program for a robot is a sequence of positions of the robot manipulator. Each of these positions is characterized by the TCP (Tool Center Point) position, the point of the tip of the tool mounted on the manipulator (by default, TCP is in the center of robot’s flange, see the picture below, but its position may be adjusted, and it is often that TCP with the tip of the tool mounted on the manipulator of the robot). Therefore, when programming, TCP position in space is often specified, and the robot determines the positions of manipulator’s joints itself. Further in this article, we will use the term “TCP position”, or, in other words, the point that the robot shall arrive to.

The program for the robot may also contain control logic (branching, loops), simple mathematical operations, and commands for controlling peripheral devices – analog and digital inputs/outputs. In the proposed approach to runtime programming, a standard PC is used as an external controller, which can use powerful software that ensures the necessary level of abstraction (OOP and other paradigms), and tools that ensure speed and ease of developing complex logic (high-level programming languages). The robot itself has only to deal with the logic that is critical to response rate, for execution of which the reliability of an industrial controller is required, for example, prompt and adequate response to an emergency situation. The control of the peripherals connected to the robot is simply “proxied” by the robot on the PC, allowing the PC to activate or deactivate corresponding signals on the robot; it is something similar to controlling “legs” of Arduino.

As it has been noted earlier, runtime programming enables sending the program to the robot in portions. Usually, a set of states of output signals and several points, or even only a single point is sent. Thus, the trajectory of the TCP movement performed by the robot may be built dynamically, and some of its parts may belong both to different technological processes, and even to different robots (connected to the same external controller), where a group of robots works.
For example, the robot has moved to one of the working areas, performed the required operations, then – to the next one, then to yet another one, and then back to the first one, etc. In different working areas, the robot performs operations required for different technological processes, where programs are executed in parallel threads on the external controller, which allocates the robot to different processes that do not require constant presence of the robot. This mechanism is similar to the way an OS allocates processor time (execution resource) to various threads, and at the same time, different executors are not linked to threads throughout the whole period of program execution.
A little more theory, and we will proceed to practice.
Description of the existing methods of programming industrial robots.
Without regard to the approach of runtime programming introduced in this article, two ways of programming industrial robots are usually identified. Offline and online programming.
The process of online programming occurs with direct interaction of the programmer and the robot at the location of usage. Using a remote control, or by physical movement, the tool (TCP) mounted on the flange of the robot is moved to the desired point.
The advantage of this method of programming is the ease of approach to robot programming. One does not have to know anything about programming; it is enough to state the sequence of robot positions.
An important disadvantage of this approach is the significantly increased time consumption, when the program is increased at least to several dozen (not to mention thousands) points, or when it (the program) is subsequently modified. In addition, during such learning, the robot cannot be used for work.
The process of offline programming, as the name implies, occurs away from the robot and its controller. The executable program is developed in any programming environment on a PC, after which it is entirely loaded into the robot. However, programming tools for such development are not included into the basic delivery set of the robot, and are additional options to be purchased separately, and expensive on the whole.
The advantage of offline programming is that the robot may be used in production and may work, while the program is being developed. The robot is only needed to debug ready programs. There is no need to go to the automation object and program the robot in person.
A great disadvantage of the existing offline programming environments is their high cost. Besides, it is impossible to dynamically distribute the executable program to different robots.
As an example, let us consider creating a robot program in runtime mode, which enables the process of writing an ad with a marker.

Result:

ATTENTION! The video is not an advertisement, the vacancy is closed. The article was written after the video had become obsolete, to show the proposed approach to programming.

The written text:
HELLO, PEOPLE! WE NEED A DEVELOPER TO CREATE A WEB INTERFACE OF OUR KNOWLEDGE SYSTEM.
THIS WAY WE WILL BE ABLE TO GET KNOWLEDGE FROM YOU HUMANOIDS.
AND, FINALLY, WE’LL BE ABLE TO CONQUER AND IMPROVE THIS WORLD

READ MORE: HTTP://ROBOTCT.COM/HI
SINCERELY YOURS, SKYNET =^-^=
To make the robot write this text, it was necessary to send over 1,700 points to the robot.
As an example, the spoiler contained a screenshot of the program drawing a square from the robot’s remote control. It only has 5 points (lines 4-8); each point is in fact a complete expression, and takes one line. The manipulator traverses each of the four points, and returns to the starting point upon completion.
The screenshot of the remote control with the executable program:

If the program is written this way, it would take at least 1,700 lines of code, a line per point. What if you have to change the text, or the height of the characters, or the distance between them? Edit all the 1,700 point lines? This contradicts the spirit of automation!
So, let’s proceed to the solution…
We have a FANUC LR Mate 200iD robot with an R-30i B series cabinet controller. The robot has a preconfigured TCP at the marker end, and the coordinate system of the desktop, so we can send the coordinates directly, without worrying about transforming the coordinates from the coordinate system of the table into the coordinate system of the robot.
To implement the program of sending the coordinates to the robot, which will calculate the absolute values of each point, we will use the RCML programming language that supports this robot and, which is important, which is free for anyone to use.
Let’s describe each letter with dots, but in the relative coordinates inside the frame, in which the letter will be inscribed, rather than in the real space coordinates. Each letter will be drawn by a separate function receiving the sequence number of the character in the line, line number and the size of the letter as input parameters, and sending a set of points to the robot with calculated absolute coordinates for each point.
To write a text, we will have to call a series of functions that would draw the letters in the sequence in which they (letters) are present in the text. RCML has a meager set of tools for working with strings, so we will write an external Python script which will generate a program in RCML – essentially, generate only the sequence of function calls that corresponds to the sequence of letters.
The whole code is available in repository: rct_paint_words
Let us consider the output file in more detail, execution starts from function main():

Spoiler: “Let us consider the code for drawing a letter, for example, letter A:”
function robot_fanuc::draw_A(x_cell,y_cell){
// Setting the marker to the point, the coordinates of the point are 5% along X and 95% along Y within the letter frame
robot->setPoint(x_cell, y_cell, 5, 95);
// Drawing a line
robot->movePoint(x_cell, y_cell, 50, 5);
// Drawing the second line
robot->movePoint(x_cell, y_cell, 95, 95);
// We get the “roof” /

// Moving the marker lifted from the table to draw the cross line
robot->setPoint(x_cell, y_cell, 35, 50);
// Drawing the cross-line
robot->movePoint(x_cell, y_cell, 65, 50);
// Lifting the marker from the table to move to the next letter
robot->marker_up();
}
End of spoiler

Spoiler: “The functions of moving the marker to the point, with or without lifting, are also very simple:”
// Moving the lifted marker to the point, or setting the point to start drawing
function robot_fanuc::setPoint(x_cell, y_cell, x_percent, y_precent){
// Calculating the absolute coordinates
x = calculate_absolute_coords_x(x_cell, x_percent); y = calculate_absolute_coords_y(y_cell, y_precent);

robot->marker_up(); // Lifting the marker from the table
robot->marker_move(x,y); // Moving
robot->marker_down(); // Lowering the marker to the table

// Moving the marker to the point without lifting, or actually drawing
function robot_fanuc::movePoint(x_cell, y_cell, x_percent, y_precent){ x = calculate_absolute_coords_x(x_cell, x_percent); y = calculate_absolute_coords_y(y_cell, y_precent);
// Here everything is clear robot->marker_move(x,y);
}
End of spoiler

Spoiler: Functions marker_up, marker_down, marker_move contain only the code of sending the changed part of the TCP point coordinates (Z or XY) to the robot.
function robot_fanuc::marker_up(){
robot->set_real_di(“z”, SAFE_Z);
er = robot->sendMoveSignal();
if (er != 0){
system.echo(“error marker upn”);
throw er;
}
}

function robot_fanuc::marker_down(){
robot->set_real_di(“z”, START_Z);
er = robot->sendMoveSignal();
if (er != 0){
system.echo(“error marker downn”);
throw er;
}
}

function robot_fanuc::marker_move(x,y){
robot->set_real_di(“x”, x);
robot->set_real_di(“y”, y);
er = robot->sendMoveSignal();
if (er != 0){
system.echo(“error marker moven”);
throw er;
}
}
End of spoiler

All configuration constants, including size of letters, their number in the line, etc., were put to a separate file.
Spoiler: “Configuration file”
define CHAR_HEIGHT_MM 50 // Character height in mm
define CHAR_WIDTH_PERCENT 60 // Character width in percentage of height

define SAFE_Z -20 // Safe position of the tip of the marker along the z-axis
define START_Z 0 // Working position of the tip of the marker along the z-axis

// Working area border
define BORDER_Y 120
define BORDER_X 75

// ON/OFF signals
define ON 1
define OFF 0

// Pauses between sending certain signals, milliseconds
define _SIGNAL_PAUSE_MILLISEC 50
define _OFF_PAUSE_MILLISEC 200

// Euler angles of the initial marker position
define START_W -179.707 // Roll
define START_P -2.500 // Pitch
define START_R 103.269 // Yaw

// Euler angles of marker turn
define SECOND_W -179.704
define SECOND_P -2.514
define SECOND_R -14.699

define CHAR_OFFSET_MM 4 // Spacing between letters

define UFRAME 4 // Table number
define UTOOL 2 // Tool number
define PAYLOAD 4 // Load number
define SPEED 100 // Speed
define CNT 0 // Movement smoothness parameter
define ROTATE_SPEED // Speed in turn

define HOME_PNS 4 // The number of the PNS program for home position return
End of spoiler

In total, we’ve got about 300 lines of high level code that took not more than 1 hour to develop and write.
If the problem had been solved in the “straightforward” manner by online programming with the use of points, it would have taken more than 9 hours (approximately 20-25 seconds per point, given the fact that there are over 1,700 points). In this case, the developer’s sufferings are unimaginable :), especially when he would have found out that he had forgotten about the indents between the frames that the letters were inscribed in, or the height of the letters was wrong, and the text did not fit in.
Conclusion:
The use of runtime programming is one of the ways to create executable software. The advantages of this approach include the following:
The possibility of writing and debugging programs without the need to stop the robot, thus minimizing the downtime for changeover.
A parameterized executable program that’s easy to edit.
Dynamic activation and deactivation robots in the active technological task, and cooperation of robots from various manufacturers.
Thus, with the use of runtime programming, an executable command may be described in a way to make its execution available for any robot within the working group, or may be written for a particular robot, that will be the only one to execute it.
However, this approach has one significant limitation – incorrect understanding of the displacement smoothing instruction (CNT) by the robot, or ignoring it, since when only the current point is sent, the robot knows nothing about the next one, and cannot calculate the smoothed trajectory for bypassing the current point with smoothing.
Spoiler: “What is trajectory smoothing?”
When moving the robot’s tool, two parameters may be adjusted:
Travel speed
Level of smoothing
Travel speed sets the speed of the tool travel in mm/sec.
Level of smoothing (CNT) allows passing a group of points along the trajectory with the least distance between the extreme points of the group.

End of spoiler

The danger of using this instruction in the runtime mode is that the robot reports its arrival to the smoothed target point, although in reality the robot is still moving towards it. The robot does it to request the next point, and to calculate smoothing. Evidently, it is impossible to know exactly in what position the robot is when passing such a point, besides, tool activation at the manipulator may be required at a certain point. The robot will send a signal about reaching the point, but it is not actually so. In this case, the tool will be enabled before it is needed. At the best case, the robot will simply ignore the CNT instruction (depending on the model).
This may be fixed by sending 2 or more points at a time, where the CNT point is not the last one; however, this increases program complexity and the burden on the programmer.
Article provided by: robotct.ru
Photo Credits: Robotct.ru

The post Industrial robot runtime programming appeared first on Roboticmagazine. Continue reading

Posted in Human Robots | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment