This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE NoStarIsType #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# OPTIONS_GHC -fplugin GHC.TypeLits.KnownNat.Solver #-} | |
{-# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import warnings | |
from collections import deque | |
import math | |
import numpy as np | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
class DdCma: | |
"""dd-CMA: CMA-ES with diagonal decoding [1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division # use // for integer division | |
from __future__ import absolute_import # use from . import | |
from __future__ import print_function # use print("...") | |
from __future__ import unicode_literals # all the strings are unicode | |
__author__ = 'Youhei Akimoto' | |
import numpy as np | |
from numpy import sqrt, exp, log |