Wednesday, February 21, 2018

Homing in on writing self-corrective programs

Self corrective programs - don't get confused - these are not the same as artificial intelligence or programs which can write themselves. They are built for a separate purpose.

The purpose is to analyse their behaviour and optimise the behaviour to preserve the purpose and intent of the program.

Let's take an example -

I want to develop a program or code to add two numbers and then put 10% commission on the added result.

Well - it's simple, put the two numbers in variables and add the same and then calculate 10% on the result.

This is by far the best operation state of the program or called as 'happy path'.

Now let's think - if any of the variable in this so called 'happy-path' is not available -

1. I don't have the processing power to add the two numbers.
2. I don't know the 2nd number but might know a set or series of the numbers which might make the second number.
3. I don't know either the first or the second number but have the series of numbers which might have been first or second.

Task every time is to calculate the commission as accurately as possible.

I am allowed to take guesses  - if that is needed.

How would I accomplish the above? ... stay tuned.

No comments:

Post a Comment