Application of Artificial Intelligence to the Development of Playing Ability in the Valorant Game

Application of Artificial


Introduction
In the modern era, many online games are now circulating as a medium of entertainment for the wider community [1]. Online games are loved by all circles of society, from children to adults. The feature that is most often found in online games is AI (Artificial Intelligent), or can be called artificial intelligence [2], [3]. AI is an artificial intelligence that a system has created on a computer [4]. If applied to a game, AI can be transformed into an NPC (NonPlayer Character) to fight players with conditions that resemble online matches [5], [6].
One of the most popular online games today is Valorant. Valorant is a free FPS (First Person Shooter) game created by Riot Games for the Windows operating system [7]. With a similar concept to CS: GO (Counter Strike Global Offensive), this game comes with two teams, five against five players [8]. The difference is that each Valorant agent or hero has unique skills to add to the excitement of the battle. This game also has a large selection of agents, weapons, game modes, and maps that can be played [9]. Valorant now also has several tournaments both in the national and international arena, so the fans are getting more and more [10]. This paper aims to find out how influential AI is on the ability to play a game player, especially in the Valorant game [11]. Is it a significant impact, or maybe players are more comfortable against other real players. AI in online games has many types, one of which is player decision-making [12], [13]. With this, the application of AI can be used to provide recommendations to players on the best ways and strategies to fight the NPCs they face [14].
As the Valorant game develops and new players are added to the game, a guide is needed that can be given to players in setting strategies in this game [15]. One of the most important strategies is determining equipment purchase at the start of each round [16]. The equipment purchase phase takes a calculation of the money you have in each round to produce efficient equipment in the game [17]. One of the algorithms that can be used in determining the equipment selection for the money/cred owned is the Greedy Algorithm [18]. This algorithm will choose the most expensive item that can be purchased by the player each round so that the possibility of the player winning that round is more significant. In addition, this algorithm will also be combined with heuristic techniques that can eliminate and improve the desired results [19].

Greedy Algorithm
The greedy algorithm is an algorithm that runs step by step and, at each stage, will choose the most optimal choice at that time in the hope that it will produce an optimal final result as well [20]. In short, the Greedy algorithm chooses an optimum local value to achieve an optimum global value. The greedy algorithm does not see the problem ahead but only at that moment [21]. As a result, the Greedy algorithm will not always produce an optimal solution.
The greedy algorithm is widely used because the steps are easy to understand and easy to use. Greedy efficiency analysis is also more accessible than other algorithms, such as Divide and Conquer [22]. The Greedy algorithm is usually used for optimization problems because there are many problems that, if explored in detail, will take a lot of time [23]. The Greedy algorithm is used to get as close as possible to the optimal solution.
1. Greedy algorithms always apply the principle of "take what you can get now!" at each step and hope that the last step will get the maximum value. The greedy algorithm has several elements that will be used to determine the steps: 2. Candidate set (C) is the set that contains the elements that make up the solution. 3. A set of Solutions (S) is a set that contains candidates selected as solutions to a problem. 4. Solution Function, which is a function to determine whether the selected candidate set has provided a solution 5. The selection function is used to select the most likely candidate to achieve the optimal solution. The selection function usually determines a candidate's most significant or smallest value. 6. Feasibility Function, which is a function that checks whether a candidate deserves to be a solution or not. Eligibility is limited using the constraints that have been determined. If it is feasible, then it is included in the solution set. 7. An objective function is a function that maximizes or minimizes the value of the solution. The greedy algorithm has several weaknesses. Namely, it does not operate entirely on all available alternatives. There are several different selection functions, so it must choose the correct procedure so that some greedy algorithm problems do not produce optimal values. However, this greedy algorithm is favored because this algorithm article is easier to understand and make than other more complicated algorithms. The time cost of this algorithm is small, so solutions can be obtained quickly.

Heuristic Techniques
Heuristics is a technique that improves efficiency in the search process with (completeness). A heuristic is an action that helps find a path in the tracing tree that demands a solution to a problem.
This technique is designed to solve problems regardless of whether the solution can be proven mathematically correct. Examples of these techniques include using guesswork, intuitive judgment, or common sense. Heuristics refer to methods for solving problems based on experience, from the learning process, and finding solutions, although they are not guaranteed to be optimal. Heuristics are not an algorithm but act as a guide. Heuristics may not always give optimal results, but they are instrumental in problem-solving. A good heuristic technique can drastically reduce the time needed to solve a problem by eliminating the need to consider unnecessary possible solutions. In addition, a good heuristic technique can help an algorithm find a more optimal solution closer to the desired result. An example of this heuristic technique is solving anagram problems. An anagram is the exchange of letters in a word or sentence so that the new word or sentence has another meaning. When completed by exhaustive search, we must search for all permutations of letters forming words or sentences, then check whether the words or sentences that are included contain meaning. Heuristic techniques can be used to reduce the number of search solutions. One of the heuristic techniques used, for example, makes a rule that in English, the letters c and h are always used as ch, so we only make permutations of letters with c and h side by side. All permutations with notes c and h are not side by side rejected from the search.

Valorant Game
Valorant is a free FPS (First Person Shooter) game created by Riot Games for the Windows operating system. With a similar concept to CS: GO (Counter Strike Global Offensive), this game comes with two teams, five against five players. The difference is that each Valorant agent or hero has unique skills to add to the excitement of the battle. One game consists of 24 rounds. With each team divided into attackers and defenders. The attacker is a team tasked with placing bombs. At the same time, the defender team must prevent this from happening. After 12 rounds, the two teams will switch roles.  Players can join the Attacker or Defender group. Each team consists of 5 players. Each player is required to complete several missions or eliminate groups of enemies. The game takes short rounds and ends when the player is defeated or the task has been completed. In most game modes, a losing player must wait until the game round is over to participate again. In this game, players can purchase weapons and other equipment at the start using the money earned based on the performance of completing missions. Players who complete tasks or defeat enemies will get money/cred according to what has been done. In addition, each player receives prize money for every completed round, and the winning team will get a large amount of money.
The mode that Valorant players are most interested in is Competitive Mode. This mode is a mode where each team must win 13 rounds out of 24 available rounds in each game. There are two parts in each game that are separated every 12 rounds. Every 12 rounds, the team will switch positions from Attacker to Defender or vice versa. At the beginning of the first round, each player is given $800 to buy equipment in the form of weapons and skills, a simple pistol, and a knife. In addition, each player in each round has been given a life of 100 HP (Health Points). The equipment available is weapons and other equipment. The round will end if one of the teams succeeds in carrying out their objective, i.e., the Attacker detonates the spike installed at the spike installation location in the space provided, or the Defender manages to defuse the bomb or prevent the Attacker from setting a point at one of the bomb installation sites during one round (3 minutes). In addition, each team will be said to have won the round if it manages to destroy all opposing team members. At the end of each round, each player will be given additional money based on their performance in that round.
Picture 6. Gameplay Valorant (Source: https://playvalorant.com/id-id/) The weapon or weapon section is divided into several types: Sidearm, Sub-Machine Gun, Shotgun, Rifle, Sniper, and Heavy. Sidearm is a gun-type weapon that is not very effective in combat but has a meager price, so it can almost always be bought with the money you have. Heavy is a weapon that tends to be heavy when used and does not have good accuracy, but having a lot of bullets can reduce the enemy's HP very quickly. Sub Machine-Gun (SMG) is a light weapon when carried and can fire its shots reasonably quickly, but every bullet that hits the enemy only reduces the enemy's HP a little. This SMG is effective in close combat but weak in long-range combat. The rifle is the weapon that Valorant players are most interested in because its fire can reduce enemy HP quickly and steadily, but it requires skill in controlling the fire. This weapon is very effective in long-range combat. Sniper is a weapon that relies heavily on longrange combat because it has a scope to see long distances and has a shot that can reduce a lot of enemy HP in one go. Still, the time it takes to shoot one image is long enough, so it relies heavily on accuracy. The weapons that the Attacker and Defender have are generally the same. Each weapon has a price that varies from 200 creds to 4500 creds. In addition, there is also armor as a player protector, divided into two based on strength, namely light armor and heavy armor, with a price of 400 and 1000 cred, respectively. The price of each piece of equipment in the form of weapons and armor can be seen below: In addition to weapons and armor, players can purchase some skills. The skills of each agent have different functions and prices. Each agent has a total of three ordinary skills and one ultimate skill. The cost of each skill purchased in each round usually ranges from 150 to 300 cred. In addition, one player can also buy equipment for other players.

Problem Analysis and Strategy Design
The main problem with this problem is maximizing equipment and buying the best equipment based on your money. It was based on the author's personal experience and seeing other players. Several things can help design a strategy to solve this problem. The more expensive the weapon, the better its performance in knocking out opponents, so the greedy algorithm is quite suitable for solving this problem. Then, several weapons perform much better than other weapons and are used more often by players than other weapons, so order, the best types of weapons are Rifle, Heavy, Sniper, Shotgun, SMG, and Sidearm. Players also tend to buy skills before purchasing weapons and armor.
1. From the things that have been mentioned above, a strategy design can be made as follows using heuristic techniques: 2. Buy skills first before buying anything else. 3. After this is fulfilled, the greedy algorithm can be used to determine the purchase of weapons and armor. 4. In the purchase of weapons, the order of weapons starts from Rifle, Heavy, Sniper, Shotgun, SMG, and Sidearm 5. After purchasing the gun, if the cost is still possible, then proceed to the purchase of armor. 6. Generally, sidearms are purchased after purchasing armor

Greedy Strategy
Greedy's strategy starts with pre-processing, sorting all weapons from the most expensive to the lowest cost. Choose the gun with the highest price at each step from the available items. In the greedy phase of purchasing weapons, the weapon that is always the first option is the Rifle type weapon. If no Rifle type weapon can be bought because the remaining money is less than the cost, proceed to Heavy, Sniper, Shotgun, SMG, and Sidearm weapons. After obtaining one weapon, move to the greedy phase to buy armor because each player can only carry one weapon. To proceed to the mean stage for purchasing grenades, players must have a minimum of 400 creds because the cheapest grenade can be purchased in Light Armor at 400 creds. Furthermore, to enter the sidearm purchase phase, the minimum money must be owned at 200 creds because the cheapest pistol, the Shorty, can be purchased at that price.

Conclusion
The conclusion from the results of this paper is that AI intervention is very influential on the environment in online games. With online games, many things can be accessed through a supporting storyline that makes the game feel at home to play. In addition, AI, which acts as an enemy in the game, functions as a form of achievement in the game or sparring against other real players.
Greedy Algorithm is one of the algorithm strategies specialized in solving optimization cases. Although greedy algorithms do not always produce optimal values, they are often used because they have solutions that are fast and often close to optimal values. This Algorithm can be used for many optimization cases. One example is the purchase of equipment in the game Valorant. Although there are many ways to buy equipment in this game, a greedy strategy can provide one solution close to the best. By purchasing the most expensive equipment that the player's money can accommodate, the more likely the player will win in this game because he has better equipment at the highest cost. Combining this strategy with Heuristic Techniques will produce a better solution and closer to the optimal solution.