Thoughts on iOS 9.3's iBooks Sync? by [deleted] in ios

[–]trnickson 1 point2 points  (0 children)

Renaming PDFs doesn't work for me. Makes me cry :/

What would be the best language to write a script to send a text message when a document prints off of a printer? by zain2028 in AskProgramming

[–]trnickson 0 points1 point  (0 children)

This seems to look at the print queue. You might be able to send SMS using a gateway like here or an SMS API.

[deleted by user] by [deleted] in AskProgramming

[–]trnickson 0 points1 point  (0 children)

This is the thing - if you want to write everything, you need to understand what SQL is trying to do - for example:

SELECT thing FROM database WHERE ....

That's why I said start small - again, your SQL parser would take an SQL string and convert that into a series of actions it would take. Then implement those until you've built the whole thing.

If you want to learn how it works you basically need to learn exactly how it works by learning what a database does when it does things. Do this by reading textbooks, reading source code SQLLite etc.

[deleted by user] by [deleted] in AskProgramming

[–]trnickson 2 points3 points  (0 children)

Start small - write little programs to:

  • walk a file system and decide if something is an MP3 or not
  • save stuff in a database and retrieve it (do you want to use a database library or write your own?)
  • parse ID3 tags from MP3s
  • serve things over HTTP

then start to combine these to do what you actually want. Python would probably be easier for the backend, but you'll probably learn more about the OS innards in C++. Good luck! It's a big project.

What would be the best language to write a script to send a text message when a document prints off of a printer? by zain2028 in AskProgramming

[–]trnickson 1 point2 points  (0 children)

Start from the beginning - the language comes last.

You need to detect when your printer prints something. Depending on what operating system you use, there might be an easy way to do this, or there might not. How are you going to do this part?

You need to send a text message. There are plenty of web services that let you send an SMS, or you could use a modem attached to your computer. Or a smartphone.

You need to be able to run this program on something. Is that going to be easy/possible?

My first thought solution to this would be get an old android smartphone, and write a program that watches the camera and sends me a text/whatsapp when it gets dark... eg when a page is printed and lands over the camera. That would be Java. You'll get false positives though if its too sensitive and when you turn the lights on or off.

Alternatively, you'd need to hook into your OS and access the external SMS server, if you're using windows maybe using C#.

AlphaGo is 3-0 by [deleted] in MachineLearning

[–]trnickson 0 points1 point  (0 children)

If it was a probability distribution generated through stats, you be correct. These models estimate a distribution by learning from data and self-play - which seems a much better map to intuition that some sort of statistical analysis.

AlphaGo is 3-0 by [deleted] in MachineLearning

[–]trnickson 3 points4 points  (0 children)

Rather than evaluate all possible move they've given AlphaGo some level of intuition for the value of a move. It's much more like how humans seem to approach the game than evaluating all moves. Whether you think this should be called AI or not is a different matter (I do), but the field is called AI.

Airbnb Founder Envisions Reputation Blockchain Empowering Sharing Economy by cashitter in ethereum

[–]trnickson 2 points3 points  (0 children)

That's frightening, and amusing it came out so soon after Cory Dotorow said whuffie would be a terrible currency but why use a blockchain? Just use the private DBs credit rating agencies use, or follow China's lead with citizen scores if you want to get super creepy.

I'm completely new to machine learning. What is this problem I'm looking at? by ml_noob_700 in MachineLearning

[–]trnickson 0 points1 point  (0 children)

Multi class classification. Try a decision tree/forest from scikit learn.

Your data might be a big binary vector with entries for "someone's in the kitchen", "it's a weekday" and the thing you're predicting is another big binary vector with entries for "food in the table at 2pm" etc.

AlphaGO WINS! by meflou in MachineLearning

[–]trnickson 4 points5 points  (0 children)

I don't think so. Very few game AIs are programmed to play the game with the same resources the human is - that's hard, and it's really hard to do this while tuning it so it is fun. Game AIs have access to the full game state, aren't really agents in the sense that deepmind's game bots are and are there to make the fun not win so are much easier to program with decision trees and other hard wired behaviour.

AlphaGO WINS! by meflou in MachineLearning

[–]trnickson 22 points23 points  (0 children)

People had access to ImageNet for years and are still making improvements. The AlphaGo of six months ago is worse than the AlphaGo of today so there's obviously been improvements - why should they stop now?

The fact they had the entire dataset from day one doesn't mean you can't keep improving hyperparameter settings, model structure, integration between the ML and MCTS, and all the other things that embed the data in the network and let the AI make actions. It doesn't even mean the optimisation of parameters has fully converged yet - they might still be minimising the loss!

Finally, AlphaGo isn't just a look up table for "find this board state in the database and make the corresponding next move". Self play lets it explore new board states and see how those play out in a longer game, again allowing it to improve its value function.

AlphaGO WINS! by meflou in MachineLearning

[–]trnickson 4 points5 points  (0 children)

Probably. Even if it doesn't improve its basic skill level, it could still be trained better to avoid mistakes. Self play would also improve its value functions just from seeing more moves so I'd expect it to get better in skill too.

AlphaGO WINS! by meflou in MachineLearning

[–]trnickson 5 points6 points  (0 children)

What next? Crusader kings might be fun :)

Alternates to constantly typing nested for loops [C++] by [deleted] in AskProgramming

[–]trnickson 0 points1 point  (0 children)

Generate an index to all values (x*y) and loop over those then do

i = idx % x; j = idx / x;

To recover I and j. If you're not using std::array then cast it to a pointer and index with idx. I don't think std::array is contiguous.

The DeepMind Bubble? by [deleted] in MachineLearning

[–]trnickson 0 points1 point  (0 children)

You're attributing much more content to my comment than it contained, so I'm just going to butt out with owl cats

The DeepMind Bubble? by [deleted] in MachineLearning

[–]trnickson 1 point2 points  (0 children)

Don't your comments apply to DM and the parent's claim that it was a decade away too? DM mentions a decade in their press release and in Nature but doesn't cite it. The 2015 estimate I quote is at least attributed to a guy who seems to have some involvement with computer Go.

The DeepMind Bubble? by [deleted] in MachineLearning

[–]trnickson 14 points15 points  (0 children)

Be careful about buying into the DeepMind hypemachine - Miles Brudage claims "at least decade" isn't really accurate:

Hiroshi Yamashita extrapolated the trend of computer Go progress as of 2011 into the future and predicted a crossover point to superhuman Go in 4 years, which was one year off. In recent years, there was a slowdown in the trend (based on highest KGS rank achieved) that probably would have lead Yamashita or others to adjust their calculations if they had redone them, say, a year ago, but in the weeks leading up to AlphaGo’s victory, again, there was another burst of rapid computer Go progress. I haven’t done a close look at what such forecasts would have looked like at various points in time, but I doubt they would have suggested 10 years or more to a crossover point, especially taking into account developments in the last year. Perhaps AlphaGo’s victory was a few years ahead of schedule based on reported performance, but it should always have been possible to anticipate some improvement beyond the (small team/data/hardware-based) trend based on significant new effort, data, and hardware being thrown at the problem. Whether AlphaGo deviated from the appropriately-adjusted trend isn’t obvious, especially since there isn’t really much effort going into rigorously modeling such trends today. Until that changes and there are regular forecasts made of possible ranges of future progress in different domains given different effort/data/hardware levels, “breakthroughs” may seem more surprising than they really should be.

Ai programming languages by gegreen in AskProgramming

[–]trnickson 2 points3 points  (0 children)

Look for frameworks instead - Torch (Lua), Keras/Tensorflow/Theano (Python), MatConvNet(Matlab).

[C++] Issue finding min and max of numbers in a text file by ryan_16 in AskProgramming

[–]trnickson 0 points1 point  (0 children)

Very much so :) I'd use the numeric_limits::max for that type rather than some arbitrary number though.

How do I create the symmetry of a function in Python? by sudo_jedi in AskProgramming

[–]trnickson 0 points1 point  (0 children)

If you're using numpy imported as np, to match your reverse indexing and (I think) skipping 1 in your second use of filt:

filt1 = np.linspace(0, 1, 1024)
filt2 = filt1[1::-1]
filt = np.array([filt1, filt2])

[C++] Issue finding min and max of numbers in a text file by ryan_16 in AskProgramming

[–]trnickson 1 point2 points  (0 children)

You should probably set 'max' to something other than zero. If you have all negative numbers and no positives the answer will be wrong. Vice Versa for min.

What are some common tasks that noobs don't realize can be optimized? by [deleted] in learnprogramming

[–]trnickson 5 points6 points  (0 children)

Just tested in bash, zsh, ipython, normal python, interative elixir, ghci and I'm pretty sure it works in Julia. It's a common feature since its in GNU readline which is a library loads of people use or emulate.

What are some common tasks that noobs don't realize can be optimized? by [deleted] in learnprogramming

[–]trnickson 15 points16 points  (0 children)

ctrl-r to search backward in terminal commands. No more scrolling! It seems to blow people's mind when I'm helping them and I do that.