« first day (3 days earlier)      last day (20 days later) » 

00:01
@Draco18s At last, I thought of an example! Not an obscure one either: '5' * 3 == '555'; 5 * 3 == 15
I don't really see why that's bad
Automatic coercion to and from strings can lead to ambiguous behavior
Like does '5' * 3 equal 15 or '53'?
Both are reasonable outcomes with coercion
Python is strongly typed by design.
@Beefster I like it too, me and Draco were talking about it last night (GMT)
@Beefster I've been trying to find evidence for chat.stackexchange.com/transcript/message/49935626#49935626
00:37
String concatenation is a specific scenario where type coercion is useful and Python doesn't do it.
Its a particular irk that print(x) is Fine, but print("X: " + x) is Not
 
3 hours later…
03:20
In python3.6+, you can do f"X: {x}"
FWIW, this is also slightly faster than concatenation. Slightly.
I've seen the syntax, but I don't know how to use it
 
15 hours later…
18:37
@Draco18s Also, you can do print('X: ', x)
 
2 hours later…
20:13
@ArtemisFowl I'm not sorry for Scoundrel
20:44
Scoundrel is getting a nice update soon, though. Won't make it a better competitor, but will make it MUCH harder to defend against. Also, it'll start going after the accountant
21:05
@Draco18s How about random defense?
Performance at that point becomes erratic
@Draco18s Well, I'm working on it and it seems to turn out okay
[==TOURNAMENT==] Final scores of the finalists:
[==TOURNAMENT==]  Bot Class    |   Score |   Mean Score
[==TOURNAMENT==] --------------+---------+--------------
[==TOURNAMENT==]  Accountant   |    2412 |        9.206
[==TOURNAMENT==]  Sprinter     |    2362 |        9.015
[==TOURNAMENT==]  LightWeight  |    1835 |        7.004
[==TOURNAMENT==]  Accomodator  |    1823 |        6.958
[==TOURNAMENT==]  PlanAhead    |    1699 |        6.485
Looking nice
Not very
used to get about 2300
I'm still working on killing Accountant
21:10
Oh wait that's money not score
[Game End]  Bot Class    | Character          |   Money |   Score
[Game End] --------------+--------------------+---------+---------
[Game End]  Sprinter     | Legolas Stark      |   $3474 |       8
[Game End]  PlanAhead    | Richard Heartfilia |   $3319 |       7
[Game End]  Accountant   | Rebecca Stormborn  |   $2739 |       6
[Game End]  LightWeight  | Link Sparrow       |   $2671 |       5
[Game End]  Accomodator  | Ron Ketchum        |   $2452 |       4
[Game End]  Artyventurer | Fiora Young XIII   |   $1949 |       3
Haha
When I make Scoundrel always choose Arty, Scoundrel dies and Arty gets 1800-2400
I'll post the updated code in a moment
I think I already fixed that
It was an error in estimating how much stamina Arty could bid
Arty gets away with it, but the scoundrel doesn't
(Because it is trying to outbid arty)
No, that's the latest Scoundrel
I'm talking code that hasn't been posted
As in, I found the problem within the last 4 hours
21:20
Oh right
But I'm also talking about code that hasn't been posted. :)
Of course :)
Scoundrel's next update will make edit wars irrelevant, btw. No more players*3 tweaking
Don't worry
I'm using random
The more attacks you add to Scoundrel, the less of a threat it is to each
This could lead to relaxed Scoundrel defence...
...and therefore make Scoundrel more efficient
Oh sure
Its the Red Queen all over again
21:27
I looked through that challenge, looked cool
(the challenge you mentioned last time when refrencing red queen)
Yep
Highway (or whatever is final name was) is just a sheer impressive feat of engineering
I never thought that coloring the entire play area would be possible
Its insane
21:40
314 turn tug of war between Diver and Lightweight, then lightweight moved off
XD
@Beefster Feature request: show total weight when a bot exits the ruins
I'll implement it myself for now, but it would be good if it was 'official'
I'd also be interested in an average take plot
@Beefster Just changed exit log code to:
                    self.gamelog(
                        player,
                        f"""exited the ruins with {
                            player.stamina
                        } stamina and {
                            len(player.treasures)
                        } treasures, totaling ${
                            player.total_value
                        } in value and {
                            player.carry_weight}kg in weight.""",
                        type='minor'
                    )
my home machine is not as fast as my work machine. Huff.
@Draco18s Me too, but I'm allowed access to the command prompt at home :)
haha
Installing python didn't take admin credentials, so I'm safe :D
21:53
Oh, it's pre-installed at my organization, but I can't use pip
or run the controller
Mm
I was able to
thank god, because you can't run the controller without tabulate
the html requesting and xml parsing? skippable
You can, you've just got to make it yourself
I was not about to go in and try and figure out how to replace tabulate with print commands
was too big of a project
validating a change in scoundrel that should have no effects what so ever...10 minute run time expected...time for tea
22:07
I could add some code to make the current dependencies optional
Kinda like what I did yesterday for ANSI sequence support detection
Microsoft is only 10+ years late to the party of colored terminals...
the html request one is easy to comment out. tabulate is harder
I can just make a print wrapper
(I'm running in IDLE)
It won't line things up, but I can use ' | ' as a separator
More of an Artemis question than for me. I just had to figure out how to install the package
(I use Python like, once a year)
22:12
One moment, I'll find some code to do it, I've been working on one for something else
I say 'something else'...
oh, and @Beefster, that output bug I mentioned? It happens at home and not on my work machine. They're both running the same commit with the same (personal) alterations (e.g. commenting out the scraper, adding the extra tournament logging).
weird
OS Versions?
super
Win 10, both
Either in WSL terminals?
22:15
should be Python 3.7 on both as well, though I'll have to verify my work machine
I don't know what that is
It's gonna explode on @dataclass if it's less than 3.7
Does Win10 do Enterprise/Professional etc.? If so, there could be your problem
well, ok, not that number then, the minor :P
(home is 3.7.1, work might be newer)
I'm in trouble if patch versions are throwing it off.
My organization's been on 3.4 for years
22:17
I can't see anything that would mess it up
So hard maintaining code between
I should have made it more compatible with the common denominator of 3.4+, but I was lazy
@dataclass saves a lot of time
More of a headscratcher than a real problem
I'd write somethng at home, only to find that there is no FileNotFoundError
They've got latest now
def table(scores):
    """
    Create a table of results. Works best with return
    from tournament function. Filenames should be in
    form 'botname__username.foo'.
    """
    names = sorted(list(scores), key=lambda x: scores[x], reverse=True)
    table = '''name                |creator             |score
    --------------------+--------------------+-----'''
    for i in names:
        name = ''.join(i.split('__')[:-1])
        if len(name) > 20:
            pname = name[:17] + '...'
        else:
> I'd write somethng at home, only to find that there is no FileNotFoundError

sounds like python 2
22:19
No, 3.4
brackets for print, lowercase tkinter
I could have sworn that was forked from OSError in 3.0...
hmmm
OSError was what fixed it, but it was definetly 3.x
ok, why is my random.choices(population=[0,1,2],weights=[1,1,1],k=30) not returning a uniform result? The fek?
13x 0, 6x 1, 11x 2
22:22
probably 3.2 or something then, my bad
small sample size?
huh?
nothing
could be
does 300 ok, that's even enough.
I just thought it was weird that I changed my weights from [1,1,1] to [1,0.5,1] and the outcome didn't change
(the tournament, on the same seed, had the exact EXACT same result despite the distribution shift)
I was consistently getting twice as many 0 as I was anything else when I was trying to debug
@Beefster I submitted a pull request to add final carry weight to exit ruins message
I love KOTH games that have a decent amount of flexibility in how to approach the problem.
22:33
@Draco18s Yeah
There was a five-man brawl one a while back that looked really good, but someone hit on a particular combo of magic powers that made him impossible to touch
not that i've competed in any others
literally CLONE plus STATIC_AURA
I'd have to dig up the challenge
basically an arena fantasy fighting sim, you got to write the controller for 5 bots on your team and could spend MP on casting spells or hit people in the face with your fist
22:35
right
sounds cool
I think I saw that one
Codemon I think it was
The spells, generally speaking, were more powerful than punching, but had limitations. The obvious one being MP costs.
@Beefster sounds about right
anyway, CLONE was a super expensive spell that cloned a bot
STATIC_AURA did 1 damage to every bot (allies included) standing adjacent
the guy then spent all his stat points in HP regen
oh right
even the barbarian build (lit. put every point possible into pumping melee damage) couldn't keep up
@Beefster RE: the pull request ... ??
22:39
ah, found it. Battle of the Fellowship. Search even dropped me right onto the answer I wanted. codegolf.stackexchange.com/questions/99744/…
I had the details slightly wrong and looks like they actually didn't final that well
I do remember that particular KOTH being hard to create new competitive entries for, though. There were just so many combinations that finding a new optimization valley (peak?) was very hard with the set of contestants already around
Wow... so much stuff!!
23:01
I merged the pull request
Thanks. Working on tabulate alternative:
def get_table(headers, rows, sizes):
    def make_len(val, size):
        if len(val) > size:
            return name[:size-3] + '...'
        else:
            return val + ' '*(size-len(val))
    def line(row):
        return '|'.join(make_len(row[i], sizes[i])
                        for i in range(len(row)))
    ret = ''
    ret += line(headers) + '\n'
    for i in rows:
        ret += line(i) + '\n'
    return ret
Not tested yet
23:24
Can anyone explain this ? i.imgur.com/O332twt.png
Oh wait no one online, asking on SO Python
@ArtemisFowl you haven't either commented out the "scrape code golf" function or installed the requests package
@Draco18s, No, the first window shows that it is installed
Missed that. Dunno.
I commented it out and moved on with my life :P
@Draco18s If you're instrested, the problem was that the python on PATH was pre-release 3.8, not the 3.7 that I'm using
haha
Currently watching Duck Tales while I wait for a long game to run with an updated Artyventurer and the tweaked Scoundrel
23:38
Oof, really long
50 points / 500 rounds. Just started round 17
Wow, really slow
*pity*
@Draco18s I'm running a game through IDLE and it's taking literally 100 times longer than command prompt/batch, what are you doing
?
Watching DuckTales obviously :D And too clueless to know how to do much else. :B
Is the game running in IDLE or command prompt?
If IDLE, try creating the following batch file (.bat):
@echo off
:start
ruins.py rem arguments go here
pause
cls
goto start
And double click it
I'll give that a go in a sec
[==TOURNAMENT==] The tournament has completed successfully!
[==TOURNAMENT==] Final scores of the finalists:
[==TOURNAMENT==] Bot Class | Score | Mean Score
[==TOURNAMENT==] --------------+---------+--------------
[==TOURNAMENT==] PlanAhead | 379 | 8.064
[==TOURNAMENT==] Scoundrel | 330 | 7.021
[==TOURNAMENT==] Accountant | 320 | 6.809
[==TOURNAMENT==] Sprinter | 292 | 6.213
of course, Accountant updated a little bit ago
23:54
@echo off
:start
python ruins.py
pause
cls
goto start
Might work better...
I've got latest (at least, by what's online) of everything else though
@ArtemisFowl after I give it the name of the .py file I have on my machine, yes
Or, mostly
it terminated the window after it was done
hmm
it shouldn't, that's what pause is for
I know
It's working on mine so i don't know
And if you can't see what it exits with...
Try doing in from the interactive command prompt (just 3rd line)
Hmm, ok, I think my machine is acting a little funky. It worked the second time
23:58
Oh, wow
I did nearly run out of disk space the other day and moving files around has been really slow
even after freeing up several gigs of space
From the batch script run:
[==TOURNAMENT==] The first place bot has achieved a 50 point lead over the second place bot!
[==TOURNAMENT==] The tournament has completed successfully!
[==TOURNAMENT==] Final scores of the finalists:
[==TOURNAMENT==] Bot Class | Score | Mean Score
[==TOURNAMENT==] --------------+---------+--------------
[==TOURNAMENT==] PlanAhead | 525 | 8.203
[==TOURNAMENT==] Accountant | 481 | 7.516

« first day (3 days earlier)      last day (20 days later) »