| Algorithm 1: Malsneural algorithm |
|
1. Procedure Augmentation(image, pro) 2. prob pro: 3. 4. prob pro: 5. 6. prob pro: 7. 8. prob pro: 9. 10. prob pro: 11. 12. Return image 13. Adaptive median filter 14. Level 1: 15. 16. 17. If image1 > 0 and image 2 < 0 go to the next level 18. Else the size of the window increased 19. If windoe size <= size max redo the level 1 20. Else return zxy 21. Level 2: 22. 23. 24. If image 3 > 0 and image 4 < 0 return zxy 25. Else return zmedian 26. End if 27. Load replay memory M to the capacity C 28. Load the function action Q along with arbitrary weight W 29. Load destination value function Q along with weight W- = W 30. For iteration = 1,N do 31. Load sequence t = {y1} and preprocessed ϕ1 = ϕ(t1) 32. For q = 1, Q do 33. The random action choosen bQ 34. Orelse choose bq = argmaxb P(ϕ(tq),b;W) 35. Compile bq in emulator and notice reward rq and yq + 1 of input 36. Set t q + 1 = tq, bq, y q + 1 and process ϕq + 1 = ϕ(tq + 1) 37. Save the transition (ϕq, bq,rq,ϕq + 1) in M 38. Minibatch (ϕi, bi, fi,ϕi + 1 ) from M 39. If it stops at i + 1 40. Initialise fj 41. Else 42. Yj = {fi + ϑmax d P(ϕi + 1,bq,W) 43. Execute gradient descent by updating the gradient value (yi-P(ϕi,bi; W))2 44. Reset ό = P 45. End for 46. End for |