Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 325 326 [327] 328 329 ... 350

Author Topic: The Generic Computer Advice Thread  (Read 574699 times)

dragdeler

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4890 on: June 07, 2022, 01:07:11 pm »

So I found what seems to be a very capable router (two of them actually), but it does not support these as far as I can tell.


Ideally, i would get one with ddwrt or openwrt support. (Check both projects for supported hardware)

https://wiki.dd-wrt.com/wiki/index.php/Supported_Devices

https://openwrt.org/toh/start


Worthwhile or skip this particular model? They're heavy, I allready kinda like them eventhough the power inlet is plain silly.

Alternatively I been sitting on a netgear router that is supported, but only does 10-100mbs.
Logged
let

Mephisto

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4891 on: June 07, 2022, 01:39:01 pm »

That's a managed switch, not a router. It also doesn't have built-in wireless which I foresee being a potential issue depending on circumstances.
Logged

dragdeler

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4892 on: June 07, 2022, 01:46:42 pm »

It sounds pretty perfect if you say it like that, going by what I was advised earlier (I'm a total novice, I can only refer you to the past one and half pages (default size)).


But like, are they inherently untrustworthy for not allowing those opensource firmwares, or has somebody had good experiences with the brand or something like that? I do not know how to judge this product other than by weight and appearance lol.

(also I screwed up assuming I could fit a standard 12v psu in there  :-\ if they were there, by the time I get back to that parc they will be burried)
Logged
let

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4893 on: June 07, 2022, 03:29:59 pm »

A managed switch may work for what you want. (Segregate traffic, except that which is destined)

The builtin software in a qnap switch should be sufficient. The OSS firmware is for consumer grade devices that think you are an idiot, and dont want to give you knobs to turn. That is a professional managed switch. It comes from the factory without mittens.

In this case, you would define a vlan containing your encoders, and another containing your normal network. The switch will isolate the traffic for you.
« Last Edit: June 07, 2022, 03:35:09 pm by wierd »
Logged

Starver

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4894 on: June 17, 2022, 01:14:37 pm »

Looking for a sanity-check on a coding (well, algorithming... the code itself is a bit pasta-ish at the moment) issue I'm dabbling with.

Having a set of nodes with (arbitrary, but fixed) subset of 'neighbouring' relationships to which a valid node value has a dependency to the value of each neighbour. I want to run through general solutions towards a (probably non-unique) valid answer.

I could just brute-force it (O^N or greater) by trying every node-value on every node (at least until a clear violation suggests a clear lack of validity, then pass over values/backtrack to previously commited nodes and try their next possibility before redrilling-down again)nbecause it's not a large set, but maybe a tolerably pseudo-optimal method of progressing through the nodes (with no nominal value, more meaningful than simply alphebetised by label!) is to build a 'try-list' as follows:

  • For all nodes, not yet in the 'sorted' grouping, choose all those that have the share (or have alone) the highest number of neighbours already in the sorted list.
    • i.e. Ones that will be maximally pre-constrained in the iterating phase, drastically reducing the tree of future permutations that flow from this decision
    • On looking for the first list item, every node would have zero pre-visited 'neighbours', but it becomes potentially most important once you're past that stage
    • The converse would clearly force the iterative value-trying process to pursue all possibly values in a non-neighbouring scattergun effect, each potentially tried out with every possible value each before trying to fit values into spots 'between' the first few. This seems like it will waste top-of-tree cycles more than it will exlude opportunities deeper down the iterative tree. Thus seems to support the higher efficacy of the my approach.
  • From all nodes satisfying the prior razor-cut (could be all of them, could be just one, which saves time) consider for use all nodes with the shared maximum count of all neighbours.
    • Thus a node that (if chosen) constrain successive nodes the (equa-l?)most
    • Yes, functionally identical to "count of all neighbours not yet enqueued" as (where there's a choice) "allneighbours = prequeuedneighbours + notqueuedneighbours" has inherited the same "prequeuedneighbours" from step 1. But might be more useful to know this value for other reasons, so giving it prime duty here for trivial convenience later. ;)
    • Again, the converse prioritisation would bring to the fore any nodes that have proportionally few constraining partner-nodes, like isolated branches that could be (e.g.) any value that can be mopped up "at the end" (giving them any value you want once and just once, without fall-back-to-and-try-next upon failing further down the tree, correcting zero 'mistakes' in the process).  Thus also convincing by counter-argument.

Then just pick any one (if there remains any choice, rather than a single 'ideal') of the nodes that passed through the two slicings.

A more advanced version could do some additional look-forward. i.e."if I choose to next choose this node (perhaps not even the most preconnected/futureconnected) it then it brings a particularly well-connected but not quite yet queue-adjacent node into range". But that'd need more of a tree-search to set up the workhorse tree-search. At the currently intended scale, a simple pick-and-add from the pool of potentialities should significantly reduce the wasted time running through the main target-seeker part.

Agree/Disagree? (On principle, at least.) I've actually already implemented it, but I'll gladly try (meta-)benchmarking against an alternate or expanded approach if anyone has any insights that I may have missed.  8)

(Just in case you're confused, I'm trying to build a smarter queue-order of setable values across which the 'dumb' iteration algorithm will then seek to try solutions by depth-first back-tracking, until validly setting the final element.)


Yes, probably reinventing the wheel, but I find it entertaining to work through from first(ish) principles.
Logged

McTraveller

  • Bay Watcher
  • This text isn't very personal.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4895 on: June 17, 2022, 04:05:20 pm »

@Starver - I don't think I understand the problem description enough to comment.  Is this something for which you can share more details, like the specific nature of what you mean by "valid values depend on the valid values of its neighbors"?

Is this something like solving a differential equation?
Logged
This product contains deoxyribonucleic acid which is known to the State of California to cause cancer, reproductive harm, and other health issues.

Starver

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4896 on: June 17, 2022, 05:57:05 pm »

A net of nodes (undirected, not easily flattened in any Euclidean or even 3+D Euclidean way, and 'small-world' crosslinks between select topologically distant nodes, regardless of how I lay them down) where the links denote "if node 1 is <foo>, then node 2 cannot be <bar> (and vice-versa)", or suchlike.

So the 'solution' (there are many if I loosen the conditions, and I'm just planning on tightening the conditions progressively until I get to a 'nice' place, and I'm not fussed to find all exhaustive answers or to exhaustively make it find a scenario that only has the single answer) will be found by trying Node 1 with <foo> (out of <foo>, <bar>, <baz>) then Node 2 with <foo> (may not be allowed because of how Node -5 was previously set, prior to our scenario being described) <bar> (nope), <baz> (maybe)... Then try Node 3... Darnit, because of its links, there are no valid values, reverse back, to 2, change <baz> to <whatever's next>, hunt back down.

Although if Node 3 isn't barred (NPI!) by Node 2 at all, but more Node 1 and further back, I'd waste time... or my tree-of-possibilities traverser would... on Node 2, so maybe prioritising a permutation of the respective Nodes 1, 3 then 2 would be better and quickly rule out what 1 can be. i.e. based on it (in)validating 3, before it is moving onto messing with 2 at all. Numbering/order is arbitrary here, for my purposes, so I'm thus looking for a marginally (at least) more fortitious ordering just to not do it in a totally stupid way.


« Last Edit: June 17, 2022, 06:00:09 pm by Starver »
Logged

McTraveller

  • Bay Watcher
  • This text isn't very personal.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4897 on: June 17, 2022, 06:39:46 pm »

Ok I think I'm still missing something - do you have a graph, and want to "color" the nodes, starting from some initial point? And you want a method to figure out how to color those in a way that doesn't violate the rules?  Or are you starting with unconnected nodes and want to connect them following the rules?

How many edges are required for your rules? Does the rule only apply to direct neighbors, or do you have rules like "if a first neighbor is foo and a second neighbor is bar"?
Logged
This product contains deoxyribonucleic acid which is known to the State of California to cause cancer, reproductive harm, and other health issues.

Starver

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4898 on: June 18, 2022, 12:41:43 am »

Ah look, it was just a "hmm, I think I've solved a problem somewhat elegently, but maybe I've missed something, I wonder if I should see if my principle can be improved upon". As it seems I can't explain it, maybe I missed the elegence aspect completely. It's 'working', so perhaps the wrong thread, wrong approach and wrong of me to think aloud about it.

But, to briefly tie up the points:

do you have a graph - yes, in the sense you clearly appreciate of a set of connectivities

and want to "color" the nodes - assign a subset of values, but yes "colour" is a good analogue, and I actually first thought I'd have to contend with a variation of the map-colouring problem (but more complex!)

starting from some initial point? - any initial point, really, but optimally that might be one of a few (or even just a clear single obvious one), identified in advance

And you want a method to figure out how to color those in a way that doesn't violate the rules? - I'm doing it pretty much the long-winded way of progressively permutating the possibilities, but there's the very long-winded way[1], or a depth-first search[2]. The DFS, in turn, seems like it can be done slightly more intelligently/stupidly, depending upon which nodes I assign to which 'depths'. My current tinkering is with how 'best' to do that DFS.

...I'll leave that only for the masochists amongst you, then.


Otherwise, I've slept on this, and maybe it's 'solved'. FCVO... Tinkering aside.


[1] For N nodes of V possible values, VN permutations and then find that most of these fail just on the first handful of nodes being wrong.

[2] Hard to quantify, but slashes huge "dimensional-chunks" off the above search-space.

[3] ½N² + ½N quick checks, and a little management overhead.
Logged

McTraveller

  • Bay Watcher
  • This text isn't very personal.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4899 on: June 18, 2022, 07:41:29 am »

Ah ok, so I think what you said matches what I suspecting.  You definitely don't have to compute all the permutations, just a subset.  I've actually done this same problem with a slightly different formulation (mine had fixed number of neighbors to each node, not arbitrary, but the method is the same).

You don't want a "tree" approach, you want something that is more like crystal growth.  You start at your seed point, then "grow outward" from that point.  Each time you set a value, you make that a "seed point".

The general algorithm is

Code: [Select]
Precondition: "value fixed" flag for all nodes is not set.

Add the starting node to a "nodes to check" list.
Set the initial value of the starting node; set its "value fixed" flag.

While the "nodes to check" list is not empty
  For each node X in the "nodes to check" list:
      remove X from the "nodes to check" list
      For each node Y connected to X
          If Y doesn't have its value fixed
               Set Y's value based on its rules and all its direct neighbors
               Set Y's "value fixed" flag
               Add Y to the "nodes to check" list

This algorithm has O(N x (average number of connections per N) x (complexity of setting Y's value) ) .  So if the algorithm isn't a permutation of Y's neighbors, but is just a scan through it, it would be O(N x (connections per N)2) ) which probably isn't terrible.

The formulation would be a little different if you have to set all X's neighbors simultaneously, rather than one at a time, but the general structure is the same.  Hope that helps!
Logged
This product contains deoxyribonucleic acid which is known to the State of California to cause cancer, reproductive harm, and other health issues.

Starver

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4900 on: June 18, 2022, 09:53:18 am »

I'm not too sure that's really equivalent to what I'm doing/resulting in my desired (variety of) result, running it in my head. It seems liable to be non-halting. Though it could be a Sudoku/Kukuro/whatever solver with some common tweaking... ;)

In an hour or three, I'll be over again at a desktop (this one without the runnable code, but with a copy of its originally sketched structure that I set down last weekend then forgot about until Thursday!) and I can take time to do a better and briefer show of what I do now. (Not late night/early morning stream of consciousness stuff that I regret later!) Should at least be good for a laugh, on your part.
Logged

McTraveller

  • Bay Watcher
  • This text isn't very personal.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4901 on: June 18, 2022, 01:04:46 pm »

I can assure you it's halting; every iteration is guaranteed to remove at least one node from the "to scan" list - at least so long as you can guarantee there is a solution.  If there is no solution for a given set of neighbors-of-X, then you'd have to back up and re-seed.  This can get expensive in memory, since you have to keep an undo stack.

I like this kind of algorithm discussion though. Keeps the cranial gears turning.
Logged
This product contains deoxyribonucleic acid which is known to the State of California to cause cancer, reproductive harm, and other health issues.

Il Palazzo

  • Bay Watcher
  • And lo, the Dude did abide. And it was good.
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4902 on: June 20, 2022, 06:06:30 am »

Android woes. How do I stop the phone from turning off when I'm trying to listen to a podcast or YouTube? Used to be I could run Firefox in PC mode, and that would keep it going. Doesn't seem to work any more.
Or just in general, how to keep it on? At best I can set it to 10 minutes before the screen turns off. But sometimes I need it to be on all the time.
Logged

Starver

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4903 on: June 20, 2022, 07:35:47 am »

I've long had Settings|Battery|Sleep set to Never, on devices like this one.

If an App doesn't have (or maybe does have, but it still gets over-rided) its own Don't Sleep While In Use (according to its own criteria of "In use..") then as long as you don't mind losing the security/powersaving of unattended-auto-sleep/etc (or that you have to keep switching it over, as deisired at any given occasion) then this may be your answer. Twisted via whatever OS differences there are between our own incarnations of the platform, naturally, the way they keep getting reskinned/etc... ;)

(PS, anyone wondering about my own prior question,I switched to boring McT with my long-winded discussions over in messaging, to spare the rest of you my verbosity!)
Logged

bloop_bleep

  • Bay Watcher
    • View Profile
Re: The Generic Computer Advice Thread
« Reply #4904 on: June 20, 2022, 09:11:12 pm »

A net of nodes (undirected, not easily flattened in any Euclidean or even 3+D Euclidean way, and 'small-world' crosslinks between select topologically distant nodes, regardless of how I lay them down) where the links denote "if node 1 is <foo>, then node 2 cannot be <bar> (and vice-versa)", or suchlike.

So the 'solution' (there are many if I loosen the conditions, and I'm just planning on tightening the conditions progressively until I get to a 'nice' place, and I'm not fussed to find all exhaustive answers or to exhaustively make it find a scenario that only has the single answer) will be found by trying Node 1 with <foo> (out of <foo>, <bar>, <baz>) then Node 2 with <foo> (may not be allowed because of how Node -5 was previously set, prior to our scenario being described) <bar> (nope), <baz> (maybe)... Then try Node 3... Darnit, because of its links, there are no valid values, reverse back, to 2, change <baz> to <whatever's next>, hunt back down.

Although if Node 3 isn't barred (NPI!) by Node 2 at all, but more Node 1 and further back, I'd waste time... or my tree-of-possibilities traverser would... on Node 2, so maybe prioritising a permutation of the respective Nodes 1, 3 then 2 would be better and quickly rule out what 1 can be. i.e. based on it (in)validating 3, before it is moving onto messing with 2 at all. Numbering/order is arbitrary here, for my purposes, so I'm thus looking for a marginally (at least) more fortitious ordering just to not do it in a totally stupid way.



So, if I'm getting you correctly, you have a set of nodes, some of which mutually exclude each other, and you want to find a maximum-size subset of nodes none of which exclude each other?

This is the maximum independent set problem: https://en.wikipedia.org/wiki/Independent_set_(graph_theory) . It is strongly NP-complete. What size inputs are you looking at here?

« Last Edit: June 20, 2022, 09:13:15 pm by bloop_bleep »
Logged
Quote from: KittyTac
The closest thing Bay12 has to a flamewar is an argument over philosophy that slowly transitioned to an argument about quantum mechanics.
Quote from: thefriendlyhacker
The trick is to only make predictions semi-seriously.  That way, I don't have a 98% failure rate. I have a 98% sarcasm rate.
Pages: 1 ... 325 326 [327] 328 329 ... 350