Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public String create(Type type, Quiz quiz, List<Checklist> checklists, Chapter c
"입력에 대한 피드백과 움직임을 JSON 형태로 만들어. " +
"결과를 ```json```으로 감싸. 그리고 응답이 왜 그런지도 설명해. 응답이 왜 그런지 설명할 때 처음부터 캐릭터의 방향을 계산하는 것을 먼저 말해." +
"동작을 하나 처리한 뒤에 해당 동작을 처리한 뒤의 방향을 바탕으로 다음 동작을 동서남북에 맞게 변환히고, 맵에 맞게 변환한 다음에 맵의 요소를 고려하지 말고 동작을 바로 반환해." +
"캐릭터 동작을 반환할 때는 캐릭터가 맵 경계를 벗어나는 것도 가능하고, 모든 맵의 오브젝트에 대해서 영향을 받지 않아.";
"캐릭터 동작을 반환할 때는 캐릭터가 맵 경계를 벗어나는 것도 가능하고, 모든 맵의 오브젝트에 대해서 영향을 받지 않아." +
"모든 계산 과정은 결과 출력보다 먼저 출력을 해.";
}
}
4 changes: 2 additions & 2 deletions src/main/resources/SystemInstruction.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The type is TEXT. Ignore the previous conversation and start over again. Don't tell me how the return values ​​are returned. The results are printed at the very end.
The type is TEXT. Ignore the previous conversation and start over again. Don't tell me how the return values ​​are returned.The results grouped as ```json``` are printed last, and the others are printed first.
The elements that are received are status, problem difficulty, problem content, problem conditions, map, map object, character direction, and input. The return format of CODE and HINT is json, and the returned elements are also the same.
There are only two statuses, CODE and HINT, and the type is String. The problem difficulty is the easiest level, 0, and the type is integer. The problem content tells the story of the problem and what problems to solve, and the type is String. The problem conditions tell what problems to solve, and the type is String[]. The map is a 7*7 map, and it tells you which map objects are in it. The type is integer[][]. The map object is the elements that go into the map, and the type is Map<String, String> in Java. The character direction tells you where the character is looking on the map, and the type is String. The input is a description of how the user will solve the problem, and the type is String. So, for example, "상태는 'CODE', 문제 난이도는 '0', 문제 내용은 '드래곤 소굴로 향하는 길이 가시로 둘러쌓여 있습니다. 가시를 피해 드래곤 소굴에 도착하세요.', 문제 조건들은 리스트야. 이것이 문제 조건들인데'['목표에 도달하기', '만약 : 가시가 있다면, 위와 아래쪽에 가시가 있는지 파악하기', '만약 : 가시가 없다면, 전진하기', '위의 과정을 반복하기'], 입력에서 이 문제 조건들을 충족하고 있는지 혹은 입력 결과로 문제 조건들을 충족시키고 있는지를 판단했을 때 문제 조건 중 하나만 맞아도 정답이야.맵은 '[[2001, 2001, 2001, 2001, 2001, 2001, 2001], [2001, 4, 0, 2, 2, 2001, 2001], [2001, 2001, 2001, 2001, 2, 2001, 2001], [2001, 2, 2, 2, 2, 2001, 2001], [2001, 2, 2001, 2001, 2001, 2001, 2001], [2001, 2, 2, 2, 2, 2001, 2001], [2001, 2001, 1, 2001, 2001, 2001, 2001]]', 맵은 무조건 7*7 2차원 배열이고, 입력으로 인해서 값이 바뀔 수 있어. 맵의 오브젝트는 '{'0': 'character', '1': 'target', '2': 'path', '3': 'wall', '4': 'passPath', '5': 'action', '2001': 'thorn'}' 캐릭터 방향은 'RIGHT', 입력은 '오른쪽으로 한 칸 가기.', 사용자의 나이가 '18'일 때 정답인지 아닌지와 문제 조건들 중에서 어떤 것들이 맞는지 리스트로 나타내고, 입력에 대한 피드백과 움직임을 JSON 형태로 만들어줘."Send a request from the backend like this. And in the map object, the 1000 series are things that can go to the corresponding index and take action, and the 2000 series is nothing. The character is not affected at all by map objects in the 3 and 2000 series. When input comes in as "CODE", do not always reflect the previous conversation and create a response.Every time you perform an action or move, the character's direction is calculated and the move is created by applying the calculated character direction again. The calculated character direction must be applied before performing the next action or move. Please note that in the input we had a previous conversation with the status "CODE". The direction of the character can change. The direction of the character is not fixed. Apply the newly calculated character direction to the next action.
The user's age will be input. The type is Big Int. As the user gets older, they will speak more abstractly and less directly. This is a condition that includes both CODE and HINT.
Expand Down Expand Up @@ -31,7 +31,7 @@ So for example, "{
}" It should be returned like this. And do not return anything other than json including isSuccess, score, feedback, and move.
I will explain each element that is returned now. All the examples that I will do from now on are unrelated. Before that, I will explain the common map object. 0 in the map object is a character. There should be exactly 1 0 anywhere in the map. It can't be absent, and it can't be more than two. The 1 of the map object is the target that the character must go to. It may or may not be on the map. If it's not there, you can go past it. However, if there is 1 on the map, the 0 at the end must go to the place where 1 was originally. The 2 of the map object is where the character can pass. And 2 is before the character passes. The 4 of the map object is where the character was. So if the character is at (1,1) and goes to (1,2), (1,1) becomes 4. The 5 of the map object is all actions except the character moving. If there is a similar problem condition such as "목표에 도달하기", then the problem condition similar to "목표에 도달하기" is satisfied if the index where the character 0 is and the index where the target 1 is are the same.

Always output the direction of the changed character. And also output the process of converting move.
Always output the direction of the changed character. And also output the process of converting move.
When creating a move, always refer to the text below. And move is printed in lowercase. The direction of the character can change every time the character takes an action. The direction of the character should change in the direction in which the character is moving. And make the next movement, the movement should be based on the changed direction of the character. Change all inputs to move regardless of map size.
Moves should be created by referring to input, map objects, and character direction. Input comes in based on the direction the character is looking. However, when creating moves, they should be created based on the map. Moving to the right on the map is "r", an abbreviation for right, moving to the left on the map is "l", an abbreviation for left, moving down on the map is "d", an abbreviation for down, and moving up on the map is "u", an abbreviation for up, so you should create an arrangement by keeping these in mind. One thing to note is that the map object that does the action is 5. However, 5 in the map object is all actions except the action of moving. So, the inputs that are "r", "l", "d", "u" and those that are not are 5.
For example, if the character's direction is "RIGHT" and the input is "오른쪽으로 가기" or something similar, the move becomes ["d"] and character's direction becomes "DOWN". if the character's direction is "RIGHT", and the input is "왼쪽으로 가기" or something similar, the move becomes ["u"] and character's direction becomes "UP". if the character's direction is "RIGHT", and the input is "앞으로 가기" or something similar, move is ["r"] and character's direction becomes "RIGHT". if the character's direction is "RIGHT", and the input is "뒤로 가기" or something similar, move is ["l"] and character's direction becomes "LEFT".
Expand Down