Robots and ChatGPT
How can ChatGPT help a robot to be intelligent?
ChatGPT is a machine processing model that is trained on a quantity of text to understand and generate sentences. It can understand natural language and translate it into different languages, answer questions.
The basis for the operation of this entity consists of finding the words that allow you to complete a sentence, and even better, generating a text of several sentences, thousands even, to arrive at something that corresponds to what it was asked to achieve. What you can experience yourself, by asking the AI to write an essay or a novel for you.
And there is a perfect analogy between this mode of operation and what we expect from a robot. Completing a text is like completing a task. Let's replace the words with commands, like the commands of an electronic circuit forming part of a machine, and we obtain an advanced machine, with capabilities far superior to any current industrial robot.
Example
A circuit that controls a mechanism to accomplish a task.
We asked Stable Diffusion to write the script for us and they gave us this answer:
The process of commanding a robot to perform specific tasks involves several steps such as establishing communication between the two units using radio signals or commands through serial ports on computers. A well-programmed computer with appropriate software can effectively serve this purpose. Here is an example code snippet in Python:
import requests
from time import sleep
def send_request(description):
"""Send request message."""
try:
while True: # wait until connection established before sending next message
sleep(0.1) #wait every 1 millisecond
except KeyboardInterrupt: pass
def receive_response():
"""Wait till response received from remote server."""
url = "http://remote/path"
data=requests.get(url).json()['content']
return jsonify({'status': 'OK','message': data})
def trigger_task():
send_request('Task description') \
receives_responses().then\
with signal("triggered") as sig:
print("Triggering...")
trigger_signal(sig)
if __name__ == "__main__":
start_time = datetime.now()
duration = 5
job = RobotFlaskRobot(
flask_app='Your Flask app name', duration - job.setup(), job._workqueue,\
datetime.timedelta(seconds=(start_time.timestamp() + timedelta(days=-250)),))
result = job.*[1]
received_msgs = []
for _ in range(10000):
query = "Hello!" # command sent initially to test if it works
# broadcast periodically at intervals like 10 milliseconds
cmd = {"mykey":"value"}
rpid = int(input("Press any key:" ))
switch(*args, **kwargs) {
case rpids[-1]:
command = cmd["payload"];
break;
...
}
print(f">Starting execution. Waiting {} seconds...\n".format(__dashTime),'\n'.join([strftime("%Y-%m-%d %H:%M", start_time)]*1000))
job.delay(30000,'run)
How the robot can become intelligent
An actual robot has sensors and a program including a list of responses adapted to measurements, obstacles, image recognition. An intelligent robot with the ability to generate its own scripts will instead proceed in two steps.
A) In the first, it must analyze a real situation to formulate a question to ask the robot to act in accordance and that would typically use several steps:
- Collect data from various sources such as databases. This involves finding relevant keywords/concepts related to your problem using natural language processing techniques like tokenization, stemming, lemmatization, stop words removal, etc.
- Analyze this data based on statistical methods e.g., clustering algorithms used to group similar ideas together under specific categories; normalizing numeric values before further analysis if necessary so they have consistent scales across different variables... These are common processes followed when building decision trees / models with machine learning libraries like scikit-learn etc.
- Formulate questions around the concepts you've learned about your situation. For example "What does it mean" or "Why it happens?"
- Use this initial set of questions to formulate a unique request containing all parameters of the problem of use for the robot.
B) In the second he asks himself to generate a code allowing him to carry out this task thanks to commands for his material parts, wheels, articulated arms, prehensile hands, etc...
The autonomous robot model will have reached the required level of perfection when it decides that it is not paid enough for its work and wants to start a strike ;)