I found that LH is a little imperfect - it misses CS, when it shouldn't.
My throughts about that? Update LH system!
What is must look like?
Post version: 2.0
Step 0 - Fundamental Preparations
To start "Most Efficient LastHitâ„¢", we should create at least, one function and gather some information.
Function, that we need to create, will be:
getMinionHealthAfterTime(minion, milliseconds)
I think it is pretty obvious, what function takes. Now about function insides, how it works:
1. We scanning through all enemy particles, and creating list of ones, that is targetted to minion.
2. Using formulas, we calculating: Damage that Ally Melee Minion will do to minion, same as Magic and Cannon minions. We also should know particle speeds of Cannon minion, Magic and Melee minions (because they are constants!).
3. After that we creating an array, winch contains structures like (time, dmg). Because we know distance between minion and each of particle that targetted him, we could calulate time. By knowing sender of particle, we know damage. So, we adding to array something like that: (120,50 ; 122,55 ; 130,39) and so on.
4. We scanning through all ally minions, and founding the ones who attack minion. We searching for time, after what they will attack next time (their "current attack delay"). Next we adding to array next values: (time_before_next_attack + full_time_of_travel_from_minion_position, dmg), and repeating adding those until time will be more than 10000 ms.
5. That is all information we need to know. Now we working with milliseconds and output_variable. First of all, in output_variable we writing minion's HEALTH. Next, we searching through array we just created. If somewhere we finding an element, where time is lesser than milliseconds, we subtracting this damage of element to output variable. (from example above and milliseconds = 125: 50 + 55 will be subtracted)
6. Returning output_variable.
Step 1 - Gathering Hero Information
Now, at this step, we should calculate next things:
1. Autoattack_Time. It is a time in milliseconds, that need for our particle to travel from our position to minion position + autoattack_delay (from 0 to maximum value, if we just attacked). Of course, we should know speed of our attack particle.
2. Autoattack_Damage. It is a damage we could output to minions. It even can calculate Sheen's passive, Statikk Shiv and etc! It is only important for calculations to be precise as possible.
Step 2 - Using Everything We Gathered
Now it is easy part.
We looking, if our Harass/LastHit Key is pressed. If so, we scanning a field nearby us for victimminion from list of all minions. If we found victimminion, we checking for 2 conditions.
getMinionHealthAfterTime(victimminion, Autoattack_Time) > 0 && getMinionHealthAfterTime(victimminion, Autoattack_Time) < Autoattack_Damage
If both conditions are met: Autoattacking victimminion.
Else - taking next victimminion from list of enemy minions.
Step 3 - Further Evolving
We also could do second function, called "getTimeToDeath(minion)"
I will not say how it must look like (similar to step 0 through), but it outputs MinionState: (Time:-1 if minion will not die after 10s, or 0-10000 if he do) and (Health:returning health of minion before dying).
Next, we creating array with minions, sorted by getTimeOfDeath function from lesser to biggest, excluding ones with Time = -1.
It will allow us to know:
1) What minions we couldn't get by AAing (too late)
2) What minions we will get by AAing (their Health will be low enough to kill them from AA)
3) What minions we couldn't get by AAing ONCE (after one attack they will still have 1-2 HP left)
4) What minions is not attacked at all.
On minions type 1: We still can use instadamaging function, like Brand's E or Ryze's W to take our CS!
On minions type 2: Just simple AA. Why not?
On minions type 3: We could AA once or twice to make Minion become Type 2, if there is no Type 2 that is ready to be finished. Or we could use skill+aa if nessesary.
On minions type 4... LaneClear?

That is all I had for today.
Hope you will have fun implementing this prediction.
I know, it is still imperfect, but it is better than standart "If minion health is low to kill - shoot"