Research Article
Intrusion Detection System Based on Evolving Rules for Wireless Sensor Networks
Algorithm 1
(GNP with rule evolving).
Input: Target generation of GNP, N; | Training data base, TrainDB; | Output: Accumulated ruleset, R; | 1: for ; ; do | 2: while ith GNP generation do | 3: Extract next rule r based on TrainDB | 4: | 5: // Calculate distance using the latest normal ruleset | 6: if then | 7: if the class of rule r equals normal then | 8: | 9: else | 10: | 11: end if | 12: break | 13: end if | 14: | 15: // Calculate distance using the latest intrusion ruleset. | 16: if then | 17: if the class of rule r equals normal then | 18: | 19: else | 20: | 21: end if | 22: end if | 23: end while | 24: GNP population comets to (i + 1)th generation | 25: end for | 26: | 27: return R |
|