Here \(f_i(x_i,x_{i_1},\ldots ,x_{i_K})\) 
depends on the state of locus \(x_i\in \lbrace 0,1\rbrace \)  and \(K\)  other loci \(x_{i_K}\in \lbrace 0,1\rbrace \) . The \(f_i\) 's are given by \(N\cdot 2^{K+1}\)  independent and identically distributed random variables sampled from a given uniform probability distribution.
See the example shown in [1]}, for a very illustrative description for the computing of the epistatic contribution per locus.
The pattern into which the scheme of interaction between loci is connected is known as the epistatic neighbourhood [2]}, [1]}.
In our simulations we use two popular neighbourhood models:
