✨ 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_count

But there are also cases when we generally have a poor idea of… ν•˜μ§€λ§Œ, ν•¨μˆ˜κ°€ μ–΄λ–»κ²Œ μ •μ˜λ˜μ–΄ μžˆλŠ”μ§€ μ „ν˜€ μ•Œ 수 μ—†λŠ” κ²½μš°λ„ μ‘΄μž¬ν•©λ‹ˆλ‹€β€¦

β€» λ¬Έμž₯이 쀑간에 λŠκ²ΌμœΌλ―€λ‘œ, 이후 λ‚΄μš©λ„ μ›ν•˜μ‹œλ©΄ κ³„μ†ν•΄μ„œ λ²ˆμ—­ν•΄λ“œλ¦΄ 수 μžˆμŠ΅λ‹ˆλ‹€.


λ‹€μŒ 절(8.2 μœ μ „μž 인코딩 방식)에 λŒ€ν•œ λ‚΄μš©λ„ μ΄μ–΄μ„œ λ²ˆμ—­ν•΄λ“œλ¦΄κΉŒμš”?