def chuang_f1(individual):
 total = 0
 if (individual[(-1)] == 0):
  for i in xrange(0, (len(individual) - 1), 4):
   total += inv_trap(individual[i:(i + 4)])
 else:
  for i in xrange(0, (len(individual) - 1), 4):
   total += trap(individual[i:(i + 4)])
 return (total,)

def chuang_f1 ( individual ) : total = 0 if ( individual [ ( - 1 ) ] == 0 ) : for i in xrange ( 0 , ( len ( individual ) - 1 ) , 4 ) : total += inv_trap ( individual [ i : ( i + 4 ) ] ) else : for i in xrange ( 0 , ( len ( individual ) - 1 ) , 4 ) : total += trap ( individual [ i : ( i + 4 ) ] ) return ( total , )
binary deceptive function from : multivariate multi-model approach for globally multimodal problems by chung-yao chuang and wen-lian hsu .