β¨ 8 - Black-Box Function λΈλλ°μ€ ν¨μ
The most common task is to find the parameters at which a particular function reaches its maxima values. κ°μ₯ μΌλ°μ μΈ λ¬Έμ λ μ΄λ€ ν¨μκ° μ΅λκ°μ κ°λ μ§μ μ μ°Ύλ κ²μ λλ€.
Often these functions have a very complex analytical form, and sometimes nothing is known at all about the function itself, and it is represented as a black-box. μ΄λ¬ν ν¨μλ€μ λΆμμ μΌλ‘ λ§€μ° λ³΅μ‘ν ννλ₯Ό κ°μ§κΈ°λ νκ³ , κ²½μ°μ λ°λΌ ν¨μ μ체μ λν΄ μ무 μ 보λ μλ κ²½μ°λ μλλ°, μ΄λ΄ λ μ°λ¦¬λ μ΄λ₯Ό βλΈλλ°μ€ ν¨μβλΌκ³ λΆλ¦ λλ€.
In this chapter, we will study the methods that help in finding values at which a certain function takes its maxima value. μ΄λ² μ₯μμλ μ΄λ€ ν¨μκ° μ΅λκ°μ κ°λ μ§μ μ μ°ΎκΈ° μν λ°©λ²λ€μ μ΄ν΄λ³Ό κ²μ λλ€.
⨠8 - Structure ꡬ쑰
In this chapter, we will cover the following topics: μ΄ μ₯μμλ λ€μκ³Ό κ°μ λ΄μ©μ λ€λ£Ήλλ€:
-
What is black-box function λΈλλ°μ€ ν¨μλ 무μμΈκ°
-
Gene encodings μ μ μ μΈμ½λ© λ°©μ
-
Genetic algorithm architecture μ μ μκ³ λ¦¬μ¦μ ꡬ쑰
π― Objectives λͺ©ν
After studying this chapter, you should be able to: μ΄ μ₯μ νμ΅ν ν, λ€μμ μ΄ν΄νκ³ μνν μ μμ΄μΌ ν©λλ€:
-
Get the understanding about what the black-box function is λΈλλ°μ€ ν¨μμ κ°λ μ μ΄ν΄νλ€
-
Explore ways to create individuals for various optimizable functions μ΅μ ν κ°λ₯ν λ€μν ν¨μμ λν΄ κ°μ²΄λ₯Ό μμ±νλ λ°©λ²μ νμνλ€
-
Examine the most suitable genetic algorithm architectures for searching maxima of a black-box function λΈλλ°μ€ ν¨μμ μ΅λκ° νμμ μ ν©ν μ μ μκ³ λ¦¬μ¦ κ΅¬μ‘°λ₯Ό κ³ μ°°νλ€
π 8.1 - What is Black-box function? λΈλλ°μ€ ν¨μλ?
In all aspects of life, we are facing various functions. μ°λ¦¬λ μΆμ λ€μν μμμμ μλ§μ ν¨μλ€μ μ νκ² λ©λλ€.
Sometimes the nature of these functions is very clear, and can be expressed as an explicit mathematical formula; this formula can be rather simple. μ΄λ€ ν¨μλ€μ κ·Έ νΉμ±μ΄ λͺ νν΄μ μνμ μΈ κ³΅μμΌλ‘ κ°λ¨ν ννλ μ μμ΅λλ€.
For example, or the rather complicated: κ°λ¨ν ν¨μλ μκ³ , λ§€μ° λ³΅μ‘ν ν¨μλ μμ μ μμ΅λλ€.
In some cases, functions are expressed using the following programming code: κ²½μ°μ λ°λΌ ν¨μλ λ€μκ³Ό κ°μ νλ‘κ·Έλλ° μ½λλ‘ ννλκΈ°λ ν©λλ€:
import math
def dummy_function(x):
even_sum = 0
even_count = 0
prod = 1
for d in str(x):
digit = int(d)
prod *= digit
if digit % 2 == 0:
even_sum += digit
even_count += 1
return math.factorial(even_sum) * x / prod**even_countBut there are also cases when we generally have a poor idea ofβ¦ νμ§λ§, ν¨μκ° μ΄λ»κ² μ μλμ΄ μλμ§ μ ν μ μ μλ κ²½μ°λ μ‘΄μ¬ν©λλ€β¦
β» λ¬Έμ₯μ΄ μ€κ°μ λκ²ΌμΌλ―λ‘, μ΄ν λ΄μ©λ μνμλ©΄ κ³μν΄μ λ²μν΄λ릴 μ μμ΅λλ€.
λ€μ μ (8.2 μ μ μ μΈμ½λ© λ°©μ)μ λν λ΄μ©λ μ΄μ΄μ λ²μν΄λ릴κΉμ?