调整图表,添加字段
This commit is contained in:
parent
b717c48ece
commit
e8e6bf8f59
|
@ -90,6 +90,7 @@ def battle_logic(flags, baseline : Baseline, battle : Battle):
|
||||||
Baseline.create(**challenger_baseline)
|
Baseline.create(**challenger_baseline)
|
||||||
battle.challenger_wp = landlord_wp if battle.challenger_position == 'landlord' else farmer_wp
|
battle.challenger_wp = landlord_wp if battle.challenger_position == 'landlord' else farmer_wp
|
||||||
battle.challenger_adp = landlord_adp if battle.challenger_position == 'landlord' else farmer_adp
|
battle.challenger_adp = landlord_adp if battle.challenger_position == 'landlord' else farmer_adp
|
||||||
|
battle.opponent_rank = baseline.rank
|
||||||
battle.status = 1 if challenge_success else 2
|
battle.status = 1 if challenge_success else 2
|
||||||
battle.save()
|
battle.save()
|
||||||
if not challenge_success:
|
if not challenge_success:
|
||||||
|
|
|
@ -28,6 +28,7 @@ class Battle(BaseModel):
|
||||||
id = PrimaryKeyField()
|
id = PrimaryKeyField()
|
||||||
challenger_path = CharField(null = False, index = True)
|
challenger_path = CharField(null = False, index = True)
|
||||||
challenger_position = CharField(null = False)
|
challenger_position = CharField(null = False)
|
||||||
|
opponent_rank = IntegerField(null = False)
|
||||||
status = IntegerField(null = False, index = True)
|
status = IntegerField(null = False, index = True)
|
||||||
challenger_wp = DecimalField(null=True)
|
challenger_wp = DecimalField(null=True)
|
||||||
challenger_adp = DecimalField(null=True)
|
challenger_adp = DecimalField(null=True)
|
||||||
|
|
|
@ -275,7 +275,7 @@ if __name__ == '__main__':
|
||||||
parser = argparse.ArgumentParser(description='DouZero evaluation backend')
|
parser = argparse.ArgumentParser(description='DouZero evaluation backend')
|
||||||
parser.add_argument('--debug', action='store_true')
|
parser.add_argument('--debug', action='store_true')
|
||||||
parser.add_argument('--enable_task', type=bool)
|
parser.add_argument('--enable_task', type=bool)
|
||||||
parser.add_argument('--update_threshold', type=float, default=0.06)
|
parser.add_argument('--update_threshold', type=float, default=0.09)
|
||||||
parser.add_argument('--db_host', type=str, default='127.0.0.1')
|
parser.add_argument('--db_host', type=str, default='127.0.0.1')
|
||||||
parser.add_argument('--db_schema', type=str, default='dou_model')
|
parser.add_argument('--db_schema', type=str, default='dou_model')
|
||||||
parser.add_argument('--db_user', type=str, default='douzero')
|
parser.add_argument('--db_user', type=str, default='douzero')
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
result[rank]['baseline'].landlord_up_path
|
result[rank]['baseline'].landlord_up_path
|
||||||
},
|
},
|
||||||
colors: ['#e02f1b', '#a82314', '#1be02f', '#14a823', '#1bcce0', '#1499a8', '#2f1be0', '#2314a8'],
|
colors: ['#e02f1b', '#a82314', '#1be02f', '#14a823', '#1bcce0', '#1499a8', '#2f1be0', '#2314a8'],
|
||||||
|
symbols: ['circle', 'circle', 'triangle-down', 'triangle-down', 'square', 'square', 'triangle', 'triangle'],
|
||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
title: {text: 'Win Rate (%)'},
|
title: {text: 'Win Rate (%)'},
|
||||||
|
|
Loading…
Reference in New Issue