Author Topic: Robot driven by the table  (Read 705 times)

0 Members and 1 Guest are viewing this topic.

amspb1

• Beginner
• Posts: 1
Robot driven by the table
« on: February 28, 2013, 05:48:12 AM »
Hello All! If the following approach makes sense?

Suppose we have a device with the K sensors and L motors. Sensor gives whole numbers
- the more on the sensor - the greater the number.
Motors are also supervised by sending the number - the higher the number - the greater the power.
How to manage such a device? It isn't necessary to write the program.
You can simply create a table in which each row contains the K + L elements.
First K elements correspond to the sensors and the remaining L to motors.

The work consists in the following: we try to find row where  first K elements match to the current state of the sensors.
Then take the remaining L elements and fed to the motors.
It is clear that it's impossible to have a table that lists all the options of sensors.
So, complete the table with typical examples, and if not found an exact match we look for the most similar to the current
state of the sensors.
As a measure of closeness we can take the usual scalar product
(the vectors are more similar if the scalar product greater).
If the maximum similarity is achieved on multiple rows,
their L - part just add up and divide by the number of such rows.

Remarks: The scalar product can be used as measure of similarity if the rows stored in the table are normalized - scalar
products of a row to itself are equal for each rows

newInRobotics

• Supreme Robot
• Posts: 1,015
• N.I.R.
Re: Robot driven by the table
« Reply #1 on: February 28, 2013, 07:23:14 AM »
If sensors provide linear output - why use a table, You can simply use linear function to work out motor value based on sensor value.

If sensor output is non-linear, then You can use table, or You can look for linear fragments in the output and use if else to determine which linear formula to use for each linear fragment.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W