-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
81 lines (72 loc) · 5.02 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
The logic is to build a flexible bot that will be able to scale given different circumstances. In order to do that we need consider the relative relation with other ship and shipyards.
In the previous version, I was eliminating moves and then weighting a 5 by 5 grid then adding them together to get a value.
With the new approach that I am taking now, instead of hard coding actions, for given situations the moves will be evaluated
and then the move with the highest value will be chosen.
In this new approach, the weighting is more decentralized and many more scenarios will be considered. There is but one simple
rule in the weightings the values will be used to weight would be between -10 to 10. And other parameters involved in the
problem will be counted towards the optimal goal.
They are different aspect to this agent:
1. If the shipyards need protection: go through the all of the shipyards surroundings and weight the directions to take
in order to save them
2. Automatically avoid my own ships to both avoid collision and distribute throughout the map
3. Distance to a cell, halite in a cell, presence of a ship(it's cargo), presence of a shipyard are the main factors in
the decision process which are evaluated differently in various situations.
- Take notes and apply them all.
- Why does it run away from enemy ships?
- Why no conversion?
- Low mining rate: The deposit rate was way too high
- Too encouraged to attack enemy shipyards
Note: No need to add the other cell with more than 6 moves for now, let's work on weights then add them
current workflow:
log all the values and try to figure out why the fuck there is a problem
# Implement:
- Add all the new stuff then start playing around with them
- Keep the additions simple for now without exponents
- Go through all the shipyards and add/subtract given there is an enemy or my own ships
- Increase tendency to deposit as the steps increase
# Fixes:
- **** At the beginning, move all the enemy ships to prevent any kind of collisions with my ships
- The decision to attack an enemy shipyard is dependent on how close it is to my shipyard
- avoid_collision should focus on distributing the ships
- Weightings for shipyard status don't work well
- write down the equations for each case to cancel each other out in a more meaningful way
- If there was an enemy ship one move away from the shipyard, just spawn
- Maybe write another module that evaluates surroundings <----
- Add exponent to the main4 thing
- Shipyard status adds to a shipyard close and subtracts from a far shipyard, fix it
- See how it would differ when you limit the ship conversion to a specific distance of 2 and 5 or maybe not even 2
- More shipyard oriented
- There should be an additional weighting process where x / moves should be multiplied
- Modify shipyard status, don't add negative values
- Log the weights for the agent_a to see why it is so good
- Chase enemy ships harder
- The mining sucks
- Use a while loop at agent for the ships
- When hitting a ship, move it in opposite direction
- There is something wrong with update process of the board at each iteration
- Adding other agents to figure out why it is breaking
- Sort the ships based on their cargo and then start processing them in order
- Add excludes moves to the decision process
- Break the exponents into a series of hyperparameters dependent on step
- The reason that I am getting errors is because, I am raising a negative value to a fractional power <---
- why the fuck am I hitting my own ships
- When the ship hits another one, it will be counting on it's additional halite that might have not been acquired
- Bring down the value of weights
- For mining, 1/4 of the halite will be mined so let's take that into account while trying to decrease the weight numbers
- Maybe rewrite the whole thing without locator object
- ***Instead of using board.next(), only update specific details for higher accuracy
- come up with equations for each of the hyperparameters
- ***** When mining is negative and they are other options available then don't mine
- Look for the best ship to convert to a shipyard
- Get weightX and Y in self.current
-follow ships within the 10 moves radius fiercefully
- do a comparison with other players to better weight the moves
- don't spawn a ship when the game is almost done
- bring down the likelihood of conversion based on the distance to the closest shipyard
- instead making ships based on step should make it based on the average number of opponent ships
- In the agent function add a utility that decides which ship is the best one for conversion
when they are no ships available
- write a module to extract info on opponents in order to consider it within the initialization of hyperparameters
- modify go_to_closest_shipyard ********
- self.weights['mine'] += self.MINING * self.current_cell.halite ** 2: divide by 16
- When there is one of my own ships, add to the convert, otherwise subtract