Electroencephalogram (EEG) is one of many important clinical diagnosing tools when abrain disorder or condition need to be confirmed or ruled out.When measuring EEG, interference will be noticeable. This could either originate fromocular movement, muscular tension or outside of the body. These interferences have ahigher amplitude than the EEG data and therefore interpretation of the EEG becomesdifficult.A manual process can be used to attempt to remove these artifacts from the EEG. Thisprocess requires experience and vast knowledge in the field, it is even in some casesreferred to as an art rather than a science. To solve this, automatic methods such asFORCe and FASTER have been proposed but their performance have so far beeninsufficient. FASTER has a specificity of >60% and FORCe was able to remove 58,3%ofall known artifacts during testing by its developers [14][15].This thesis work attempts to find a solution to this problem by proposing a generalizedmethod for detection of artifacts, while under the limitation of only having access to afew labeled samples of data.An evolutionary approach was chosen and implemented as a genetic algorithm. Thealgorithm uses a self maintained database of two second long independent componentsfound through independent component analysis being applied to unlabeled data. Thegenetic algorithm is used to label the independent components as either an artifact orclean EEG. The labeled samples are used as training data for this purpose.The database is then used to evaluate unseen independent components by comparingthe mean distance between the signals. The best match's label is then used to determineif the unseen independent component describes an artifact or clean EEG.The algorithm is validated using 248 previously unseen EEG epochs out of which 80were clean EEG and 168 were artifacts. The suggested method achieved an averageaccuracy of 82,74%, average specificity of 91,25% and average true detection rate of86,99%. The algorithm's result during these tests is superior to the results achieved bythe developers of FASTER when comparing specificity, and true detection rate but notwhen comparing accuracy and run time.This new method shows potential but requires further optimization before it can be putto practical use in the field. The usages of a genetic algorithm is questionable but shouldbe considered to possibly function as a compliment to other methods which normallyhas a low average specificity.