The work on [2] is fascinating to me, both because of the problem domain and as a case study on the effective application of ASP. I will be reading this paper carefully to pore over the details.
I second the recommendation to start with Lifschitz and move on to the Potassco book from there. To add: One does not need to know Prolog to get into ASP, the semantics are unique and more minimal. That said, I personally struggled with ASP before it clicked, it takes time to grasp the lingo and grok the semantics if you have never worked with something similar. Best to have a guide that introduces the concepts one at a time ("What do you mean, there's more than one type of negation?!")
The "Easy ASP" [0] tutorial from Potassco can walk you through some examples, if you'd like.
The playlist is aimed at a general scientific/business audience, the presenter suggests that a lot of natural and business systems can be described in this manner. The presenter also mentions how a Clingo program was used, without modification, to optimize radio frequency band allocation.
Here's a repository [1] of ASP programs in clingo. Under problem classes, I see mostly: game AIs, graph problems, various puzzles, so on.
Potassco is a wonderful collection of software. I have used clingo recently to prototype some puzzle ideas that I had. After encoding the rules in ASP I could quickly produce a single model through clingo to see if the puzzle design was feasible or not. (I also decided to use clingo to enumerate the solution space, but it turned out to be much bigger than I anticipated and after ten days I terminated the process with just shy of a billion solutions found...)
Since then I have been dreaming of using it to actually power puzzle software, where a single logic program could be used for both puzzle generation and validation. But that's not even the only "power couple" I can think of with respect to clingo/ASP integration. There are a number of hard problems that benefit from the declarative approach and could leverage the power and speed of a solver like clingo. And with libclingo this is now a feasible option to transform your problem into an ASP program, call clingo, then transform the answer set into your solution.
I used generic programming to automatically generate puzzles for a puzzle game. It worked really well. I still needed to play each generated puzzle to see if it was interesting/fun. But most of them were great. I can imagine that ASP would be really good for that kind of thing.
ASP has both classical negation and negation-as-failure, but that is not quite why I'd say it is "more declarative". Prolog is capable of performing "imperative" tasks (by this I really mean side effects), while ASP solvers exclusively find stable models (answer sets) that may (or may not) exist for a given logic program. In ASP you can only declare a model with your input, and the output is either one or more stable model(s), or the knowledge that the model was unsatisfiable.
You are right about it being more than just a "modeling language to solve combinatorial problems", I agree that description sells it a bit short. As you pointed out, it is well suited for problems involving non-monotonic reasoning and uncertainty. You can encode reasoning that is more reality-hardened, with logical rules to deal with imperfect information.
>> ASP has both classical negation and negation-as-failure, but that is not quite why I'd say it is "more declarative". Prolog is capable of performing "imperative" tasks (by this I really mean side effects), while ASP solvers exclusively find stable models (answer sets) that may (or may not) exist for a given logic program. In ASP you can only declare a model with your input, and the output is either one or more stable model(s), or the knowledge that the model was unsatisfiable.
Thanks for the insight. I must confess I still don't have a lot of experience with ASP, mainly because of my initial misunderstanding of it.
To clarify, I'm not interested in the declarative aspect of logic programming so Prolog's side-effect-ness doesn't bother me. I prefer it in fact that Prolog is pragmatic that way and allows itself to be used to do practical work, that would otherwise have to be delegated to another language or tool. Prolog is a big, dirty ball of cheating but I've kind of made my home in it and I'm comfortable there.
But my research interest is in machine learning of logic programs (Inductive Logic Programming, ILP). A big part of that is dealing with noise and uncertainty, which traditional approaches to ILP aren't very good at. In recent years there has been a flurry of work in learning either ASP, or with ASP, and I guess I feel a bit like an idiot to finally realise why. My hope now is that I can find a way to reuse the ideas in ASP with the learning framework I studied in my PhD, where first-order programs are learned by a form of higher-order SLD-Resolution. I think the combination of a sound and refutation-complete inductive algorithm with an elegant treatment of uncertainty could produce something really unique.
Answer set programming is also well suited for combinatorial search problems such as this. The classic approach for ASP solvers is to reduce a logic program into an instance of the boolean SAT problem and feed that into a SAT solver. The language used in ASP is a variant of Prolog called AnsProlog. AnsProlog programs may have variables which are grounded before solving, and programs may produce any number of stable models (satisfiable solutions). Here is my own general Sudoku solver in AnsProlog:
#const d=3.
#const n=d*d.
1 { s(X,Y,1..n) } 1 :- X=1..n, Y=1..n.
% Achieved: A value is chosen for each cell
X1=X2 :- s(X1,Y,N), s(X2,Y,N).
Y1=Y2 :- s(X,Y1,N), s(X,Y2,N).
% Achieved: No value is duplicated for any given row or column
r(X,Y,Z) :- X=1..n, Y=1..n, Z=((X-1)/d)*d+((Y-1)/d)+1.
(X1-X2)*(X1-X2)+(Y1-Y2)*(Y1-Y2)=0 :- s(X1,Y1,N), s(X2,Y2,N), r(X1,Y1,Z), r(X2,Y2,Z).
% Achieved: No value is duplicated within a d*d region
#show s/3.
The program above can be used to generate completed puzzles from scratch, or it can be combined with an input file containing an incomplete puzzle to generate any or all valid solutions. Due to the semantics of ASP, additional constraints can be appended to the program to support Sudoku variants without modifying the existing lines.
There is, perhaps surprisingly (or not), already a relevant XKCD mentioning this feature while poking fun at the computational abominations that were already possible in Excel:
On that note, TFA claims that the introduction of LAMBDA finally makes Excel Turing complete, unlike the kind of Turing machine simulators the stick figure is referring to in the XKCD comic...
> (In contrast, Felienne Hermans’s lovely blog post about writing a Turing machine in Excel doesn’t, strictly speaking, establish Turing completeness because it uses successive rows for successive states, so the number of steps is limited by the number of rows.)
But the amount of raw material on the planet needed for manufacturing more disks is finite.
The amount of raw material in the universe is finite at a given point in time (it could be infinite over time, we don't know if time is infinite either).
I think we've already established (especially over the past year) that fiat money is infinite.
The Turing machine is a mathematical model. Infinity only exists in the world of mathematics. The physical world is by definition finite.
A paper clip machine scenario but instead it wants to turn all atoms into hard drives so it can keep running itself. A machine who's purpose is itself. A stupid orobus that will kill us all.
Take everything in the world. Every physical piece. Break it into the smallest slice you care to: (atoms, quarks, whatever). The count of those things is bounded. It's a huge number, but it's finite. Infinity is not a real concept, it's imaging that there is no number that can be bounded.
This demonstrate countability, not finiteness. If by "world" you mean universe, there's no guarantee that you can "take everything in it", because it might be infinite.
Not necessarily. The observable Universe could also be reducing over time. Distant galaxies are accelerating in their travel away from our observation position because space itself is expanding. This means that over long periods of time, objects at the periphery of the observable Universe will red shift out of view.
What happens if both DNS requests are hijacked? Could an attacker return both a different IP and a different public key that correspond to a malicious server?
Edit: I should clarify, I think the issue stems from DNS being a potential attack vector itself. You can't blindly trust what DNS tells you. This is precisely the problem that certificate chains (issued by a trusted third party) purport to resolve-- one of trust.
Well there's DNSSEC. Implementation details (such as lack of practice in key rotation, TTL, etc) aside, DNSSEC works and LetsEncrypt validates it.
Then there is Certificate Transparency logs. It will be passive action at this point, but it's an action regardless.
Let's Encrypt checks DNS validation and DNS CAA from multiple PoPs, but I don't think it's enforced by CA/B requirements to do so (happy to be corrected).
While the majority of existing homebrew are either games or emulators, the systems are not limited to just playing games and there are a few options for programming them. devkitPro[0] provides a cross-compiling toolchain for 3ds homebrew development, if you are comfortable with C/C++ it is not all that difficult to program on the platform. There are several "portlibs" including SDL (SDL1 not SDL2 unfortunately) provided by devkitPro, which come in handy if you don't want to learn low level 3ds-specific APIs. There are also some homebrew game engines[1] that allow running Lua-based programs, though I haven't tried these myself.