Click here to Skip to main content
14,580,625 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralWSO CCC - 12-Feb-2020 Pin
Kornfeld Eliyahu Peter11-Feb-20 22:22
mveKornfeld Eliyahu Peter11-Feb-20 22:22 
AnswerRe: WSO CCC - 12-Feb-2020 Pin
musefan11-Feb-20 22:35
Membermusefan11-Feb-20 22:35 
PraiseRe: WSO CCC - 12-Feb-2020 Pin
Kornfeld Eliyahu Peter11-Feb-20 22:44
mveKornfeld Eliyahu Peter11-Feb-20 22:44 
GeneralRe: WSO CCC - 12-Feb-2020 Pin
pkfox12-Feb-20 2:34
professionalpkfox12-Feb-20 2:34 
GeneralRe: WSO CCC - 12-Feb-2020 Pin
Kornfeld Eliyahu Peter12-Feb-20 3:01
mveKornfeld Eliyahu Peter12-Feb-20 3:01 
GeneralRe: WSO CCC - 12-Feb-2020 Pin
musefan12-Feb-20 3:07
Membermusefan12-Feb-20 3:07 
General"Jack and Jill, and the Hill" a modeling puzzle Pin
BillWoodruff11-Feb-20 20:04
mveBillWoodruff11-Feb-20 20:04 
1. Jack likes Jill 80% of the time with an intensity of 75%

2. Jill likes Jack 70% of the time with an intensity of 65%

3. When it's a sunny day, 6 times out of ten sunny days: Jack and Jill will go up the Hill

4. When it's overcast, or raining: they go up the Hill 1 out of 15 overcast days.

5. When Jack and Jill are up the Hill:

    5a. Jack likes Jill with an intensity of 80~99%

    5b. Jill likes Jack with an intensity of 76~90%

6. there is a pattern of quantum fluctuations in Jack's liking Jill based on the extent to which Jill likes Jack.
    
7. there is a pattern of quantum fluctuations in Jill's liking Jack based on the extent to which Jack likes Jill.
So, you have some external factors: weather, location (up/down the Hill).

And, you have some dynamic variation/interdependency in the intensity of "liking." An obvious complexity in the interdependency is the quantization suggested: that's left unspecified here, but let's assume there is some mechanism at play that tends to stabilize (prevent recursion) as their states change (an analogy would be using the Solver in Excel to solve linear and nonlinear optimization problems). fyi: I believe that the act of verbal interaction between people involves this type of status/role/context "negotiation" to establish a conceptual frame; I don't expect you to Smile | :)

Just to give a hint about how you might implement a reciprocal relationship:
// .NET 4.8
public class RelationStates<T>
{
    public string Source { get; }
    public string Target { get; }

    public Dictionary<string, (T, T)> RelStates;

    public Func<(T, T), string> GetStateFunc;

    public string GetState((T, T) values)
    {
        return GetStateFunc?.Invoke(values);
    }

    public RelationStates(string source, string target, Dictionary<string, (T, T)> relstates = null)
    {
        Source = source;
        Target = target;

        RelStates = relstates ?? new Dictionary<string, (T, T)>();
    }
}
Sample usage:
RelationStates<int> JackToJill = new RelationStates<int>(
    "Jack", "Jill",
    new Dictionary<string, (int, int)>
    {
        {"indifferent", ( 0,10) }, 
        {"warm", (20,40) }, 
        {"friendly", (50,79) }, 
        {"intimate", (85, 90) }, 
        {"love", (95,100) }
    });

JackToJill.GetStateFunc = tuple => { return "not implemented"; }; // yes, this compiles !

var state = JackToJill.GetState((23, 24));
I predict your mind already began sketching out some interesting function to do the required mapping of an arbitrary pair of input "like" numbers to one of the "quantized states" Jack can be in vis-a-vis Jill.

For me, of interest is how a mutual dependency can be implemented so that Jack's change of state can be modulated by Jill's change of state, and vice-versa. Throw in the weather, and location for flavoring.

One idea might be to have each state function invoke other functions based on something like: Jack's and Jill's functions exchange measures of state change magnitude with each other ?

Remember: all work and no play makes Jack a dull boy.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali

GeneralRe: "Jack and Jill, and the Hill" a modeling puzzle Pin
musefan11-Feb-20 21:37
Membermusefan11-Feb-20 21:37 
GeneralRe: "Jack and Jill, and the Hill" a modeling puzzle Pin
BillWoodruff11-Feb-20 22:05
mveBillWoodruff11-Feb-20 22:05 
GeneralRe: "Jack and Jill, and the Hill" a modeling puzzle Pin
Greg Utas12-Feb-20 2:46
professionalGreg Utas12-Feb-20 2:46 
GeneralRe: "Jack and Jill, and the Hill" a modeling puzzle Pin
musefan12-Feb-20 3:01
Membermusefan12-Feb-20 3:01 
GeneralRe: "Jack and Jill, and the Hill" a modeling puzzle Pin
dandy7212-Feb-20 6:41
Memberdandy7212-Feb-20 6:41 
GeneralHope they don't stop operations and ask you to get down, mid-air Pin
Nand3211-Feb-20 18:31
MemberNand3211-Feb-20 18:31 
GeneralRe: Hope they don't stop operations and ask you to get down, mid-air Pin
the goat in your machine11-Feb-20 20:47
Memberthe goat in your machine11-Feb-20 20:47 
GeneralRe: Hope they don't stop operations and ask you to get down, mid-air Pin
CPallini11-Feb-20 22:09
mveCPallini11-Feb-20 22:09 
GeneralRe: Hope they don't stop operations and ask you to get down, mid-air Pin
Amarnath S11-Feb-20 21:21
professionalAmarnath S11-Feb-20 21:21 
GeneralRe: Hope they don't stop operations and ask you to get down, mid-air Pin
Sander Rossel11-Feb-20 21:40
professionalSander Rossel11-Feb-20 21:40 
GeneralRe: Hope they don't stop operations and ask you to get down, mid-air Pin
Dan Neely12-Feb-20 3:23
MemberDan Neely12-Feb-20 3:23 
GeneralRe: Hope they don't stop operations and ask you to get down, mid-air Pin
Richard MacCutchan11-Feb-20 21:45
mveRichard MacCutchan11-Feb-20 21:45 
GeneralRe: Hope they don't stop operations and ask you to get down, mid-air Pin
Greg Utas12-Feb-20 7:03
professionalGreg Utas12-Feb-20 7:03 
GeneralRe: Hope they don't stop operations and ask you to get down, mid-air Pin
Mark_Wallace11-Feb-20 22:19
MemberMark_Wallace11-Feb-20 22:19 
GeneralRe: Hope they don't stop operations and ask you to get down, mid-air Pin
harold aptroot11-Feb-20 22:42
Memberharold aptroot11-Feb-20 22:42 
GeneralRe: Hope they don't stop operations and ask you to get down, mid-air Pin
Stefan_Lang12-Feb-20 21:06
mveStefan_Lang12-Feb-20 21:06 
GeneralRe: Hope they don't stop operations and ask you to get down, mid-air Pin
Jacquers11-Feb-20 22:49
MemberJacquers11-Feb-20 22:49 
GeneralRe: Hope they don't stop operations and ask you to get down, mid-air Pin
PIEBALDconsult12-Feb-20 13:34
professionalPIEBALDconsult12-Feb-20 13:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.