Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ENG)
The
calculate_expected_landing_point_x_for
function is designed for the movement of computers, not humans. According to the original code at https://github.com/gorisanson/pikachu-volleyball, this function must be executed regardless of conditions. However, due to its significant computational requirements, conditions have been added to optimize the reinforcement learning environment.The
calculate_expected_landing_point_x_for
function is always executed at the end of theprocess_collision_between_ball_and_player
function. Since thecalculate_expected_landing_point_x_for
function is intended to determine computer movements, it is unnecessary when two people are playing. Conditions could be added tocalculate_expected_landing_point_x_for
within theprocess_collision_between_ball_and_player
function, but that would require adding aplayer_X
argument toprocess_collision_between_ball_and_player
, altering it from its original form. To keep theprocess_collision_between_ball_and_player
function as close to the original as possible, thecalculate_expected_landing_point_x_for
function, which is currently executed unconditionally at the end, will be removed and instead executed explicitly outside based on conditions.KOR)
calculate_expected_landing_point_x_for
함수는 사람이 아닌 컴퓨터의 움직임을 위한 함수입니다. 원본 코드인 https://github.com/gorisanson/pikachu-volleyball 에 의하면 위 함수는 조건에 상관없이 무조건 실행되어야 합니다. 하지만 해당 함수는 연산량이 적지 않기 때문에 강화학습 환경의 최적화를 위해 조건을 추가하였습니다.calculate_expected_landing_point_x_for
함수는process_collision_between_ball_and_player
함수 마지막에 무조건 실행됩니다.calculate_expected_landing_point_x_for
함수는 컴퓨터의 움직임을 결정하기 위한 함수이므로 사람 두명이서 플레이할 경우 이 함수는 실행될 필요가 없습니다.process_collision_between_ball_and_player
함수안에서calculate_expected_landing_point_x_for
에 조건을 추가할 수 있지만 그러면process_collision_between_ball_and_player
함수에player_X
인수를 추가해야 하므로 함수를 최대한 원본과 비슷하게 하기 위해process_collision_between_ball_and_player
함수의 마지막에 무조건 실행되는calculate_expected_landing_point_x_for
함수를 제거하고 밖에서 명시적으로 조건에 따라 실행될 수 있도록 합니다.I posted an issue on the referenced code repository regarding this matter, but it was not incorporated into the original code due to the opinion that the original code should be preserved as much as possible.
원본 저장소에 이에 대한 issue 를 올렸으나, 원본 코드를 최대한 유지하시겠다는 의견으로 인하여, 원본 코드에는 반영되지 못하였습니다.
gorisanson/pikachu-volleyball#24 (comment)