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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
|
# Genshin Impact Artifact Optimizer
An automated artifact optimization system based on the scoring methodology by Sevy. This tool helps you find the best artifact builds for multiple characters by intelligently distributing your artifact inventory based on priority order.
## 🎯 Features
- **Character Priority System**: Assign artifacts to characters in your specified priority order
- **Intelligent Scoring**: Uses the proven scoring system that accounts for all relevant substats
- **Energy Recharge Compliance**: Automatically checks if builds meet ER requirements
- **Flexible Main Stats**: Supports character-specific ideal main stat preferences
- **4-Star Fallback**: Uses 4-star artifacts when suitable 5-star pieces aren't available
- **Interactive Interface**: Easy-to-use command-line interface for character selection
- **Detailed Reporting**: Comprehensive build analysis with scores and recommendations
## 📊 Scoring Methodology
Based on the artifact scoring system that converts substat rolls into a 0-100 score:
### Special Numbers (Stat Weights)
- **CRIT Rate**: 3.0
- **CRIT DMG**: 6.0
- **ATK%**: 5.0
- **HP%**: 5.0
- **DEF%**: 6.0
- **Energy Recharge**: 5.5
- **Elemental Mastery**: 20.0
- **Flat ATK**: 45.0
- **Flat HP**: 700.0
- **Flat DEF**: 50.0
### Score Calculation
For each artifact:
1. Divide each relevant substat value by its special number
2. Sum all the values (represents substat roll count)
3. Divide by 9 (max possible rolls) and multiply by 100
### Quality Tiers
- **44+ Good**: Can clear Abyss with difficulty
- **55+ Great**: Comfortable Abyss clearing
- **66+ Amazing**: Well-built character, strong performance
- **77+ Insane**: Excellent builds, Abyss feels easy
- **88+ God-like**: Exceptional builds, lottery-winner luck
- **99+ Exodia**: Theoretical perfection
## 🚀 Quick Start
### Prerequisites
- Python 3.6+
- Genshin Impact artifact data (JSON format)
### Basic Usage
1. **Automated Mode** (uses predefined character priority):
```bash
python artifact_optimizer.py
```
2. **Interactive Mode** (select your own characters):
```bash
python interactive_optimizer.py
```
### Data Files Required
**data.json** - Your artifact inventory in the format:
```json
{
"format": "GOOD",
"version": 2,
"artifacts": [
{
"setKey": "GoldenTroupe",
"slotKey": "flower",
"rarity": 5,
"mainStatKey": "hp",
"level": 20,
"substats": [
{"key": "critRate_", "value": 10.1},
{"key": "critDMG_", "value": 14.0},
{"key": "hp_", "value": 16.9},
{"key": "enerRech_", "value": 11.7}
],
"id": 1
}
]
}
```
**characters.json** - Character build requirements:
```json
{
"Furina": {
"er_requirement": {"min": 180, "max": 200},
"ideal_main_stats": {
"sands": ["HP%", "ER%"],
"goblet": ["HP%", "Hydro DMG Bonus"],
"circlet": ["CRIT Rate", "CRIT DMG"]
},
"substat_priority": ["ER%", "CRIT Rate", "CRIT DMG", "HP%", "Flat HP"]
}
}
```
## 🎮 Interactive Mode Features
### Character Selection
- View all available characters
- Add characters to priority list in any order
- Remove characters from priority list
- View detailed character requirements
### Character Information Display
- Energy Recharge requirements
- Ideal main stats for each artifact slot
- Substat priority ranking
- Special notes and considerations
### Optimization Settings
- Enable/disable 4-star fallback artifacts
- Adjust ER requirement flexibility
- Customize scoring parameters
## 📋 Example Output
```
==================== FURINA ====================
📊 Average Artifact Score: 59.46/100
✅ Energy Recharge: 180.3% (180-200%)
📋 ARTIFACT BUILD:
Flower (GoldenTroupe) - Level 16 ⭐⭐⭐⭐⭐
Main Stat: hp
Score: 87.12/100
Substats:
• critDMG_: 14.0%
• hp_: 16.9%
• enerRech_: 11.7%
• critRate_: 6.2%
```
## 🔧 How It Works
### Priority-Based Assignment
1. Characters are processed in your specified priority order
2. For each character, the system finds the best possible 5-piece build
3. Once artifacts are assigned, they're removed from the pool
4. Later characters get the best remaining artifacts
### Smart Main Stat Filtering
- Only considers artifacts with suitable main stats for each character
- Falls back to 4-star artifacts if no suitable 5-star pieces exist
- Respects character-specific requirements (e.g., Chiori needs DEF%)
### Energy Recharge Validation
- Calculates total ER from main stats and substats
- Supports complex ER requirements (multiple scenarios)
- Provides flexibility buffer for realistic builds
### Build Quality Assessment
- Scores each individual artifact for the specific character
- Averages scores across all 5 pieces
- Adjusts scores based on ER requirement compliance
## 📁 File Structure
```
test/
├── artifact_optimizer.py # Core optimization engine
├── interactive_optimizer.py # Interactive user interface
├── data.json # Your artifact inventory
├── characters.json # Character requirements
├── README.md # This file
└── optimization_results.txt # Generated results
```
## 🎯 Supported Characters
Currently includes optimized builds for:
- **Furina**: HP/Hydro DPS hybrid
- **Escoffier**: Cryo DPS
- **Fischl**: Electro off-field DPS
- **Chiori**: Geo DEF-scaling DPS
Add more characters by extending the `characters.json` file.
## 💡 Tips for Best Results
1. **Prioritize wisely**: Put your most important characters first
2. **Include ER requirements**: Builds that can't rotate are useless
3. **Don't over-optimize**: 66+ scores are excellent for most content
4. **Consider set bonuses**: The optimizer focuses on substats, manually verify set effects
5. **Level your artifacts**: Higher level = better main stats = higher scores
## 🔮 Future Enhancements
- Set bonus consideration in scoring
- Weapon-specific optimizations
- Team composition analysis
- GUI interface
- Database integration
- Cloud save support
## 📖 Credits
- Scoring methodology inspired by Sevy's artifact rating system
- Built for the Genshin Impact theorycrafting community
- Special thanks to all TCers who contribute to character guides
## 🐛 Troubleshooting
**"No suitable build found"**: Character needs specific main stats not available in your inventory
**Low scores across all builds**: Your artifact quality may need improvement through farming
**ER requirements not met**: Consider ER% sands or prioritize ER substats
**Missing character data**: Add character requirements to `characters.json`
---
*Happy artifact farming, Traveler! May your rolls be blessed by RNGesus.* 🎲✨
|