def chuang_f3(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(2, (len(individual) - 3), 4):
   total += inv_trap(individual[i:(i + 4)])
  total += trap((individual[(-2):] + individual[:2]))
 return (total,)

def chuang_f3 ( 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 ( 2 , ( len ( individual ) - 3 ) , 4 ) : total += inv_trap ( individual [ i : ( i + 4 ) ] ) total += trap ( ( individual [ ( - 2 ) : ] + individual [ : 2 ] ) ) return ( total , )
binary deceptive function from : multivariate multi-model approach for globally multimodal problems by chung-yao chuang and wen-lian hsu .