« first day (1395 days earlier)      last day (3449 days later) » 
00:00 - 17:0017:00 - 00:00

12:00 AM
One other thing we could do: once a scan hits a certain ratio higher than the others after recursive depth x - n
Stop right there instead of continuing.
 
That would only apply when you only have one legal move in the present. When you look ahead and only see one valid move, that wouldn't be a reason to stop the evaluation.
 
@PhiNotPi I know. I said "in the first scan."
 
I found a good article for evaluating the board using pieces only: home.comcast.net/~danheisman/Articles/…
Oh, I didn't catch that.
 
If we did my latest suggestion, we could stop, for example, if one move returns a bunch of high captures and the others don't do anything.
 
If a move captures a queen, for example, that is definitely a move the AI should investigate first.
 
12:03 AM
For example, even at recursive level x > 3, we could stop after a series of moves can capture the queen, rook, rook with no or few losses.
 
If it determines that the queen capture is a good move, then it would be able to prune away almost everything else immediately.
 
Exactly.
 
We want some method of evaluating when to stop evaluating...
 
And we need to always check if len(move_array) == 1: return...
This would stop once we are only investigating one move.
*stop us
Hi, @Doorknob
 
For example, we don't want to stop when there's a potential checkmate one move deeper.
 
12:06 AM
True, if that checkmate is in a different move series...
If it is in the chosen move series, no need to find it this time.
 
Also, what about memoization?
In most cases, a move on one side of the board does not affect what moves are valid on the other side of the board.
 
Hmm, but it just might.
Queen moves to H8, cannot move pawn protecting king on A1.
Pawn could be on B2, for example
We would need a list of pieces affected by the move...
It could be done, but it might be tricky.
And it might weaken the AI.
 
The pieces affected by the move would be limited to the pieces a queen/knight's move away from the starting or final squares, including moves "through" pieces.
so, a lot pieces would be affected.
in the worst case
 
I wonder if we could adjust the AI as the game goes on.
 
memoization probably won't work like that
 
12:11 AM
For example, level x with 16 pieces on the board, x+n with 16-p pieces....
 
We could try to keep a list of evaluated positions, so that two series of moves that give the same position can be skipped over.
 
Again, that could be a problem.
Knight moves, counter move, knight moves.
The knight could do this 2 different ways, and the counter move could be different.
Probably would be different.
 
If the counter move is different, then it won't give the same position and isn't what I'm talking about.
 
Oh, OK.
In memoization, we would need to watch for moves being opened up too.
Supper is going on, I'll need to leave soon.
 
I say we just put memoization to the side right now.
 
12:15 AM
OK.
 
In on step of the game tree search, the function would receive X as some value, and then pass along X as a new value. I think the new value of X should be a function of the current X combined with the number of legal moves.
Like maybe X = X/N - 0.01
 
So the fewer valid moves, the farther the AI looks?
 
Yeah
 
Could make sense, but again, we need something to override it for easy-to-decide moves.
 
How about....
 
12:19 AM
What is the use of going to level x+n when you have 2-3 valid moves with one clear winner?
How about once a move is a certain ratio ahead of the others, we choose it?
It could weaken the AI in some few instances, but most (all?) optimizations will.
 
Let's say that there is one move with a score of 7 and two with a score of 3.
 
Pawns = 1 point
Knights = 3 points
Bishops = 3 points
Rooks = 5 points
Queens = 9 points
OK, supper is on, see you in a little bit.
 
Then the value of N would be (total value of all moves)/(value of this move)
So that obvious moves are treated at less of a move.
So the move of 7 would be 1.85 while the moves of 3 would be 4.33
 
@hosch250 Hello!
Sorry, I've been a bit busy recently.
 
@Doorknob He just left, like 5 seconds ago.
You were a bit too late.
 
12:36 AM
I think there are going to be two different board evaluations.
The first is the limited-look-ahead evaluator, which determines the material imbalance and detect immediate wins.
 
@user2179021 Ahaha no probs, do you get what I was trying to do though? (also I'm not sure how bad floating point precision might get this way...)
 
The second is a variable-look-ahead which uses the limited-look-ahead to determine how much further the position should be evaluated.
 
1:09 AM
@MartinBüttner Hmm doesn't look like you'll get much more votes for regex golf polling... should I just award the bounty?
 
@PhiNotPi @Doorknob I'm back!
@PhiNotPi We already solved the deepcopy problems.
We need to override deepcopy with our own deepcopy (like Doorknob did last time).
@PhiNotPi and @Doorknob Check this out: archive.computerhistory.org/projects/chess/related_materials/… and 2-1.Programming_a_computer_for_playing_chess.shannon/2-0 and 2-1.Programming_a_computer_for_playing_chess.shannon.062303002.pdf
There you are, @Doorknob
 
Oh hello again.
 
We are doing preliminary problem solving for the chess game.
How can I delete a Github repo, @Doorknob?
I don't have the app.
Oh, nvm.
Found it.
@Doorknob I found a chatroom that is very star friendly.
Can you write me a bot to auto star everything posted by a certain member (not me)?
 
1:32 AM
@hosch250 Is it 2nd Monitor? ;)
 
Yup.
Are you a member there?
 
I guess you could do something with stackexchange-chatty.
(If you know Ruby.)
 
Remember the last time I tried to write Ruby?
 
@hosch250 I have an account on CR, but I've never posted anything with it. (I sometimes spy on them because they're our evil nemesis site. :P)
 
I've posted two questions, +13 and +6
The first got three answers, the second none.
Here's @PhiNotPi again!
 
1:35 AM
Allo!
 
@Doorknob This is what happened the last time I wrote Ruby: chat.stackexchange.com/transcript/message/12954242#12954242
Read a little farther down to see your response.
14
Q: Is it normal for a programmer to not have 100% clarity over their own code at times?

83457I'm not an expert programmer so this may be why, but I've come to notice that whenever I create complex code (like a Chess game I recently made), I am able to write the correct code to get the program working, although I find that later on- or even a few seconds after!- I often have to pause, and...

Should we use a 5d array in our chess game?
 
5d array of what?
 
To process moves, like the guy above.
Not serious, really.
 
The Shannon paper is probably just a little bit outdated (written in '49).
 
@PhiNotPi I don't know.
We are just beginning, so I think a lot of it will still be relevant.
Also, I think some of this may be relevant still.
Chess still has a lot of problems that haven't been solved even by the pros.
 
1:47 AM
Earlier, I think someone said something about self-training the AI.
 
@hosch250 Heh, now I remember that. Yeah... maybe not Ruby. Manish made a Python chat wrapper; not sure if it supports starring or now.
 
I don't think I did.
 
Self-training would probably not be possible, but self-evaluation would be.
 
Unless you are referring to this:
2 hours ago, by hosch250
I wonder if we could adjust the AI as the game goes on.
I meant more self-evaluation.
 
As a measure of how "self-consistent" the AI is, we would have it evaluate a position, make its move, and then re-evaluate the position.
If the AI is self-consistent, its evaluation should not change by much.
 
1:49 AM
I remember when we were debugging/analyzing the checkers AI.
I don't know.
What if the move is the game-changer?
That would change the evaluation.
What if the queen is captured?
 
I'm talking about the long-term evaluation of a board, not the static evaluation.
 
Oh, OK.
 
The AI should be able to locate the game-changing moves ahead of time and thus give the original board the correct evaluation.
 
Oh, I see.
 
If it can't, then it means that the evaluation depth is too small to see the strategy and it is a weak AI.
 
1:54 AM
Or, that the look-ahead isn't looking far enough.
I read somewhere that even at modern computing power, they can't get AI's to play games looking clear to the end.
It was going to take many million years or something.
In checkers, we settled for a level of 5 after the optimizations.
I recently beat it, though.
It wasn't too easy until towards the end.
 
Somewhat unrelated, I think I figured out a way of deciding how deep to go in the evaluation.
 
Oh?
Write it down somewhere (maybe in OneNote).
I know, we can create a shared OneNote notebook to work on these problems in.
I'll do it in a sec.
 
@hosch250 Huh, I've never heard of OneNote.
Is it similar to Google Drive?
 
No, that is OneDrive.
OneNote is a digital notebook.
Evernote is the closest thing to it.
 
Gah, what's all this "conflicting change" stuff? I say we just use a Google Doc
 
2:03 AM
@PhiNotPi What did you put that in the title for?
 
I didn't intend to put that in the title.
 
OK.
 
Been gone for the weekend, so I'm obviously missing something that a casual glance through the chat isn't helping with. What is ASCII chess?
 
@Geobits A few other people from PPCG (@hosch250, @PhiNotPi, @Volatility) and I were collaborating on hangman and checkers programs in ASCII. Now we're doing chess (I guess).
 
2:08 AM
Something that Doorknob, PhiNotPi, and I are doing this winter break.
 
We should use a separate chatroom.
 
I was afraid it would close on us again.
 
So, it's just chess, but displayed in ASCII rather than pretty?
 
Yeah.
Simpler and easier in our limited time.
 
Got it. Carry on ;)
 
2:09 AM
Hmm, I wonder if I can try and find our old one from the checkers/hangman era
 
I just posted a link to it - the Ruby post.

 The ASCII Collab Club

Users collaborating on ASCII art games and stuff. See pinned m...
 
 
3 hours later…
5:13 AM
Hmmm how often do site self-evaluations happen? Looks like the last one for codegolf was almost 2 years ago
 
 
6 hours later…
10:45 AM
@Sp3000 I'm intending to bump the post later today. If there's still no more response tomorrow, you can award it if you want.
 
Hmmm k well might as well just award it now before I forget later then
 
11:05 AM
I'll remind you :P
too late :D
 
:D
Well I don't think it'll change much from 2/2/8
 
What would you personally have voted, out of curiosity :)
 
11:17 AM
probably 5
 
:) I see
 
11:35 AM
@Sp3000 we've got another sub-30 answer!
 
Woo, was waiting for that
 
Ah... I miss those times when I was fighting for top rep position of the month, neck to neck with Martin ..
 
Not unexpectedly, it's the 29 I had ready :P
 
me too!
I was just going to post as I saw a new answer :P
 
11:49 AM
wow people are using GA for the regex question!
might as well get a paper out of it :D
 
Ahaha nice
I tried GA for a recent assignment of mine - it did terribly though :( (probs not suited for the problem)
 
were you trying to do your math homework via GA ?
:P
 
Ahaha nah - given a length L and a collection of strings S, try to find the string of length L appearing in each string in S
That's easy, but then there's hardmode: the string you want might appear with any number of mismatches and you want the best string (e.g. the target string is ABCDE, but it's hidden in string1 as ABCDD, and in string2 as EBCDE)
 
@Optimizer what's stopping you? ;)
 
@MartinBüttner Upvotes, I guess.
 
11:58 AM
lol
well the recent drought of questions is a bit of a problem
 
true. and I guess I did not participate much in the code scrambling question
 
oh yeah, that did get me some rep :D
 
some ? :P
 
Translation: Some -> I'll lay off from question writing for a bit so everyone else can catch up to the enormous amount of rep I currently have thanks to that question
 
We all should have a deal with Calvin to give him a guaranteed rep per day if he posts 1 question a day at least ;)
2
 
12:07 PM
Man, I need something better than ^P|^[^C|\\]*$
 
@Sp3000 I think I'll increase the total character limit by 1 as well (i.e. make the limit inclusive)
otherwise it doesn't really make sense with the scoring
 
Ahaha k
 
for answer 1 to 5, the denominator in the score would be strictly greater than 30 and less than or equal to 31. so the maximum size should be 30 to ensure a less than 1 score
@Sp3000 @user23013 @Unihedron @hwnd @nhahtdh @FireFly @chilemagic @Ypnypn @es1024 @BetaDecay @plannapus I just changed the rules for the regex challenge. Happy golfing! :)
 
Ahaha I'll see if I can get 29 first, I think I have a 30
Yeah 30 :/
 
12:34 PM
@MartinBüttner :)
 
@Unihedron still waiting for your awesomeness....
 
12:51 PM
@MartinBüttner So is the byte size now 30 or 31?
 
@hwnd 36
the change was applied retroactively
the dashboard now shows how many bytes the next answer may use
 
Up to 36? hmmm
 
Sp's unofficial ranking of match regexes in order of annoying-ness:
[^?][PG]$
PPCG
^P
(?<!\\..)(?!]).$
^[P^]P
<and the rest>
:(
 
@hwnd of course, your score will still be dramatically better if you find a 30 or 31 byte solution ;)
@Sp3000 btw, how did VVVVVV go yesterday? ^^
 
I tried lab and ragequitted on the fourth trinket
Because you have to squeeze past that tiny gap twice
 
12:58 PM
that's Unobtainium, right?
the lab is ridiculous
it's almost as bad as SS2
did you try the warp zone?
 
Yeah I tried warp zone too and kept dying on.. er... what was that one again
Well there's only one trinket
 
the trinket?
 
Yeah
I get what I need to do, but after passing the first set I get too excited and fail the second
 
if you're good you can skip the first set... there's a couple of frames or so, where you can go through the wall at the same time as the second pacman without being hit
 
Ahaha that sounds even more annoying :o
 
1:02 PM
I discovered that by accident... I can do it often enough, to be sure that it's not a single frame, but not consistently enough to actually risk it ^^
I think the worst part of that level is the two rooms with the hearts though
 
Oh... that too :/
Yeah I think after getting the trinket (with a lot of deaths) I got to the hearts room and kept failing that
Then I decided not to do warp zone
tbh I'd rank lab as easier :/
 
@MartinBüttner I love that game.
 
what are these games you are playing ?
 
I can beat the entire game from the start within three hours, which is a great achievement, considering many people find the intermissions so difficult.
 
@Optimizer VVVVVV
@Unihedron including trinkets?
 
1:06 PM
this is just one. I saw a couple of other names too
 
I think I rushed through it in half an hour when I was going for the die-less-than-X-times achievements
 
@MartinBüttner Yes. At some point I nail "Getting here is half the fun" every time with no failures.
 
is this part of some collection ?
 
@Unihedron that's nuts
@Optimizer not that I'm aware of
 
The hardest has to be "Prize for the reckless", but that's free in speedrun mode.
"Pretend spikes are here, if you wish" :D
 
1:06 PM
I mean now this prize of the reckless ..
 
@Unihedron what? :D
 
lemme google you a vid...
 
Prize for the reckless was the only one I had to look up how to do
@Optimizer they are room names in the game
 
Is that the one where you need to die in the main game?
 
oh
any link to the game ?
 
1:07 PM
@Sp3000 yes
 
Right
 
oh, now it makes sense why it doesn't work in the time trials
 
@Sp3000 Yeah, with the specific checkpoint. You can't hit any checkpoints in the coming few stages.
 
I never even tried SS2 in the time trials
 
1:08 PM
Oh hey they have a demo
 
5 usd
hmm
 
The demo has like... 2 levels
 
@Optimizer I actually had that CJam code in my i^n answer at some point, but deleted it, because there's no way to handle the integer inputs in that few characters in CJam
 
did you actually try in Java interpretter ? I cannot right now ...
 
@Optimizer will do
to answer your comment
Symbolic computation. It doesn't actually use a floating-point value for pi. Pi is just some "object" and the Sin and Cos function return exact results for known arguments involving Pi.
 
1:11 PM
I see
sneaky ...
 
okay, I just checked, same result
 
The weird thing is that P2/ gives correct result
exact 1
I mean P2/ms
 
well, you might be lucky that it rounds to 1
but it's not guaranteed
and for larger integer inputs it will probably be further and further off
 
let me see
nope
P2/1024*mc is still 1
 
oh right
powers of 2 won't have that problem
because they only affect the exponent, not the significand
 
1:14 PM
P2/1026*mc is -1
 
123456789 is 0.9999999...
 
see mc
P2/123456788*mc is still 1
 
*floats*
 
blames Java
 
lol
that would happen in any language that doesn't use symbolic computation
 
1:16 PM
so its ms which have issues ?
or its going towards 0
 
no, it could be either
 
yeah
 
it's just impossible to guarantee an exact result
 
P2/123456791*mc
is weird small
 
(Hmmm I need to be careful with [^blah] in Regex101 because that matches newlines...)
 
1:20 PM
yep
for testing I usually just add a \n into those
 
Nice :P didn't think of that
 
this question has a weird bounty criteria
15
Q: Optimum Letter Cards for Spelling Words

Yimin RongLet's say you have a list of words and you want to be able to use letter cards to spell each word. For example, to spell cat, you would use three cards labelled C, A, T. Assuming each card is double-sided, submit a program to define a minimum number of cards that can be used to spell the entire ...

Who asks for more questions and then set bounty for highest upvoted answer ? :D
Also, the current answer is not optimal...
 
28 bytes already, only 68% correctness :(
 
I have a 21 byte that matches all but 4, but I can't match the last 4 in 8 bytes :(
(the good thing about it though is that it matches the first 5 regexes, the hardest)
 
What to do in such scenarios ?
 
1:28 PM
Ugh 32 bytes =[
 
@Optimizer What do you mean "what to do"?
 
Well I take it by "most popular" it means "maybe more than 1 answer would be good"
 
Most popular is by votes
and any new entry wont be able to score more votes than an original old answer in normal scenarios
 
Nevermind I got a 30 byte solution.
 
and the bounty is set because the question has not received enough attention -_-
 
1:29 PM
@Optimizer Well that's the bounty-offerers problem, right?
 
Also, the current answer is not optimal.
@MartinBüttner It is. But its stupid. And he is not replying to my comments too.
 
@MartinBüttner Is there a certain rule I follow to post the next failed strings?
 
11/16 30 bytes, think this is really hard...
 
@Optimizer I think I read a post on MSE once that bounties are completely up to whoever offered them. It's their rep, so they can do whatever the hell they want (including completely ignoring whatever criterion they put on the bounty), because it's their own rep they're giving away.
@hwnd what do you mean? you just copy the last match and fail set and add your regex to one of the two (your choice)
 
I think typically the regex is shoved in the group that it fails itself on (e.g. if it matches itself, it's usually put in the fail set). Not a rule, but that's what's been happening
 
1:42 PM
@MartinBüttner so is it okay for someone to vote for close to such question where the bounty was given to a random person (as that someone thinks, not the bounty chooser)
 
... And is also why this is getting harder
 
@Optimizer why would that be okay? o.O
 
well, someone did it to me once.
 
@Unihedron well, if you don't do it, the next person just reposts your regex with shuffled character classes/alternatives
 
saying that since you have not given the bounty to the right answer (read - answer other than mine), I am voting to close as unclear what you are asking
 
1:43 PM
A win-win situation!
 
@Optimizer Nope, doesn't seem legit to me. Bounties, as votes, are completely arbitrary.
 
Hmm, can we vote to close that vote to close then ? ^^ :P
 
VTC'ception
 
VTCeption
Yeah .. I read that. Some people are just ...
 
1:46 PM
@Optimizer which one is it?
 
@Optimizer the close vote has long expired
and apparently the close vote was for accepting the answer, not for awarding the bounty... that seems to be a somewhat more legitimate reason to me
 
Oh, just saw that. Never knew they expire
He said. Now that the bounty is over ...
 
@Optimizer yes, because you can't close vote questions which have a bounty on them
 
oh!
 
1:54 PM
(well there goes my 30 :D )
 
 
1 hour later…
2:59 PM
Man, why does ASCII \` just *have* to be between [` and ]...
 
^ This made me cry as well ;_;
 
Also I find it funny that because hwnd put the regex in the fail set that I can't post my 30 :D
 
you can post his though :P
 
Heh, but that's no fun :P
(I gave up on trying to get 29, unfortunately. Killing \..3 was quite damaging to that tactic)
 
3:40 PM
Eh, good enough
 
3:56 PM
It'd be funny to use .NET balancing groups to assign each char either ( or ) so that only the match strings had balanced brackets
But just doing so takes too many chars :/
 
4:30 PM
@Optimizer fixed
@Sp3000 maybe we'll get there :P
 
:P if only
I think ^((?!blah).)*$ being viable would happen sooner, but like the match set the first regex is pretty annoying
(especially since C.$ is longer than ^P)
 
4:46 PM
@MartinBüttner What ?
 
@Optimizer never mind, it's long gone :P
 
:S
 
I just can't find another byte or two to tie with/beat Pyth...
 
I am trying something radical
 
:D
Also is ? ? the extremely confused ternary operator? ;p
list = list.empty? ? [0] : list
 
4:52 PM
lol, that was ruby syntax
yes it is, and how is the ternary operator confusion? ^^
@FryAmTheEggman better? :P
 
I knew what you meant, I just thought it looked odd. :P Do you really need 2 ? in ruby o_0
 
@FryAmTheEggman the method name is empty? in Ruby
 
Whoa, ok. It would've killed them to call it is_empty, right ;)
 
lol... well... Ruby allows ? and ! in method names and it's quite idiomatic to use them where applicable
the best thing is that Ruby also has single-character string literals in the form ?_ (where _ is the character you want in the string)
so you can do stuff like a.empty???::??
 
4:58 PM
which is a.empty? ? ?: : ??
 
I have now added ruby, along with perl, to my list of esolangs that people pretend are regular languages ;)
5
 
00:00 - 17:0017:00 - 00:00

« first day (1395 days earlier)      last day (3449 days later) »